org.eclnt.jsfserver.polling

## Class DefaultLongPolling

- java.lang.Object
- - org.eclnt.jsfserver.polling.DefaultLongPolling

- All Implemented Interfaces:
    java.io.Serializable, ILongPolling

      public class DefaultLongPolling
      extends java.lang.Object
      implements ILongPolling, java.io.Serializable

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultLongPolling()`

  - ### 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()` If true then after this response a new request from the client will be created immediately - i.e. the next polling is started immediately.
    `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()` Writes some chunk content into the connection so that the connection is not timed out.
    `boolean` | `waitForEvent(HttpServletResponse response)`
    `void` | `wakeup(boolean continuePolling)` When an event is triggered then the wakeup method is to be called.
    `void` | `wakeupForReconnect()` Calling this method will trigger the long polling to pass back a reconnect-signal to the client side.

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

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

- - ### Constructor Detail

    - #### DefaultLongPolling

          public DefaultLongPolling()

  - ### 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()

      If true then after this response a new request from the client will be created immediately - i.e. the next polling is started immediately.
      Specified by:
        `getContinuePolling` in interface `ILongPolling`

    - #### 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`

    - #### waitForEvent

          public boolean waitForEvent(HttpServletResponse response)

    - #### wakeup

          public void wakeup(boolean continuePolling)

      Description copied from interface: `ILongPolling`
      When an event is triggered then the wakeup method is to be called. This will send the response to the client side. This is the method to be called by your application in order to trigger the response.
      Specified by:
        `wakeup` in interface `ILongPolling`

    - #### wakeupForReconnect

          public void wakeupForReconnect()

      Description copied from interface: `ILongPolling`
      Calling this method will trigger the long polling to pass back a reconnect-signal to the client side. On client side the long polling will rebuild a new connection to the server side and continue the long polling.
      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()

      Description copied from interface: `ILongPolling`
      Writes some chunk content into the connection so that the connection is not timed out.
      Specified by:
        `keepAlive` in interface `ILongPolling`

Copyright © CaptainCasa Gmbh. All Rights Reserved.