org.eclnt.jsfserver.polling.websocket

## Class DefaultLongPollingWebSocket

- java.lang.Object
- - org.eclnt.jsfserver.polling.websocket.DefaultLongPollingWebSocket

- All Implemented Interfaces:
    ILongPolling

      public class DefaultLongPollingWebSocket
      extends java.lang.Object
      implements ILongPolling

  Server side web socket processing for WEBSOCKETPOLLING component.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultLongPollingWebSocket()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `abortThread()` Abort long polling thread.
    `void` | `abortThreadWithErrorIfWaiting()` Abort long polling thread with error.
    `void` | `abortThreadWithouContinuingPolling()` Abort long polling thread - and tell the client that it should not continue to create new poll requests.
    `boolean` | `getContinuePolling()`
    `java.lang.String` | `getId()` Returns the id under which the buffered content is registered.
    `java.lang.String` | `getLongPollingResponse()`
    `java.lang.String` | `getURL()` The URL that can be passed back to client side for accessing the buffered content.
    `void` | `keepAlive()` Same as `wakeupForReconnect()`.
    `void` | `registerEndPoint(WebSocketPollingEndPoint endPoint)`
    `void` | `unregisterEndPoint()`
    `void` | `wakeup(boolean continuePolling)` Send a trigger to the client side so that the WEBSOCKETPOLLING component activates its actionListener processing.
    `void` | `wakeupForReconnect()` In order to avoid time outs of connections you may send some "keep alive" trigger periodically.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultLongPollingWebSocket

          public DefaultLongPollingWebSocket()

  - ### Method Detail

    - #### getId

          public java.lang.String getId()

      Returns the id under which the buffered content is registered.
      Specified by:
        `getId` in interface `ILongPolling`

    - #### getContinuePolling

          public boolean getContinuePolling()

      Specified by:
        `getContinuePolling` in interface `ILongPolling`

    - #### registerEndPoint

          public void registerEndPoint(WebSocketPollingEndPoint endPoint)

    - #### unregisterEndPoint

          public void unregisterEndPoint()

    - #### getURL

          public java.lang.String getURL()

      The URL that can be passed back to client side for accessing the buffered content. The URL contains the session id. The URL is a relative URL that can be passed to all Swing-based components (e.g. FILEDOWNLOADLINK) in any scenario.
      When using CaptainCasa in embedded usage mode (UI is running with stand alone Tomcat within one virtual machine) and passing the URL to the BROWSER component then there will be problems. Use the function getURLForBrowserUsage() instead.
      Specified by:
        `getURL` in interface `ILongPolling`

    - #### wakeup

          public void wakeup(boolean continuePolling)

      Send a trigger to the client side so that the WEBSOCKETPOLLING component activates its actionListener processing.
      Specified by:
        `wakeup` in interface `ILongPolling`
      Parameters:
        `continuePolling` - If "true" then the web socket connection is kept. If "false" then the connection is closed.

    - #### wakeupForReconnect

          public void wakeupForReconnect()

      In order to avoid time outs of connections you may send some "keep alive" trigger periodically.
      Specified by:
        `wakeupForReconnect` in interface `ILongPolling`

    - #### abortThreadWithouContinuingPolling

          public void abortThreadWithouContinuingPolling()

      Description copied from interface: `ILongPolling`
      Abort long polling thread - and tell the client that it should not continue to create new poll requests.
      Specified by:
        `abortThreadWithouContinuingPolling` in interface `ILongPolling`

    - #### abortThread

          public void abortThread()

      Description copied from interface: `ILongPolling`
      Abort long polling thread.
      Specified by:
        `abortThread` in interface `ILongPolling`

    - #### abortThreadWithErrorIfWaiting

          public void abortThreadWithErrorIfWaiting()

      Description copied from interface: `ILongPolling`
      Abort long polling thread with error.
      Specified by:
        `abortThreadWithErrorIfWaiting` in interface `ILongPolling`

    - #### getLongPollingResponse

          public java.lang.String getLongPollingResponse()

    - #### keepAlive

          public void keepAlive()

      Same as `wakeupForReconnect()`.
      Specified by:
        `keepAlive` in interface `ILongPolling`

Copyright © CaptainCasa Gmbh. All Rights Reserved.