Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.directwebremoting.util
Class Continuation

    java.lang.Object
      org.directwebremoting.util.Continuation

    public class Continuation

extends java.lang.Object

A wrapper around Jetty Ajax Continuations

Author:
  Joe Walker [joe at getahead dot ltd dot uk]

Constructor Summary
`Continuation(javax.servlet.http.HttpServletRequest request)` Fish the Jetty continuation out of the request if it exists

Method Summary
`java.lang.Object` | `getObject()` Accessor for the object associated with this continuation
`boolean` | `isAvailable()` Are continuations working? If this method returns false then all the other methods will fail.
`static boolean` | `isJetty()` Did we find any of the
`void` | `resume()` Resume an continuation.
`static void` | `rethrowIfContinuation(java.lang.Throwable th)` We shouldn't be catching Jetty RetryRequests so we rethrow them.
`void` | `setObject(java.lang.Object object)` Accessor for the object associated with this continuation
`void` | `suspend(long sleepTime)` Suspend the thread for a maximum of sleepTime milliseconds

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Continuation

    public Continuation(javax.servlet.http.HttpServletRequest request)

  Fish the Jetty continuation out of the request if it exists

  Parameters:
    `request` - The http request

Method Detail

### isAvailable

    public boolean isAvailable()

  Are continuations working? If this method returns false then all the other methods will fail.

  Returns:
    true if Jetty continuations are working

### suspend

    public void suspend(long sleepTime)
                 throws java.lang.Exception

  Suspend the thread for a maximum of sleepTime milliseconds

  Parameters:
    `sleepTime` - The maximum time to wait
  Throws:
    `java.lang.Exception` - If reflection breaks

### resume

    public void resume()
                throws java.lang.Exception

  Resume an continuation. For Jetty this does not work like a real continuation because it restarts the http request.

  Throws:
    `java.lang.Exception` - If reflection breaks

### getObject

    public java.lang.Object getObject()
                               throws java.lang.Exception

  Accessor for the object associated with this continuation

  Returns:
    the object associated with this continuation
  Throws:
    `java.lang.Exception` - If reflection breaks

### setObject

    public void setObject(java.lang.Object object)
                   throws java.lang.Exception

  Accessor for the object associated with this continuation

  Parameters:
    `object` - the object associated with this continuation
  Throws:
    `java.lang.Exception` - If reflection breaks

### rethrowIfContinuation

    public static void rethrowIfContinuation(java.lang.Throwable th)

  We shouldn't be catching Jetty RetryRequests so we rethrow them.

  Parameters:
    `th` - The exception to test for continuation-ness

### isJetty

    public static boolean isJetty()

  Did we find any of the

  Returns:

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¬ 2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD