|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.directwebremoting.util.Continuation
public class Continuation
A wrapper around Jetty Ajax Continuations
Field Summary | |
---|---|
protected static java.lang.Class |
continuationClass
Jetty code used by reflection to allow it to run outside of Jetty |
protected static java.lang.reflect.Method |
getObject
How we get the associated continuation object |
protected static boolean |
isJetty
Are we using Jetty at all? |
protected static java.lang.reflect.Method |
resumeMethod
How we resume the continuation |
protected static java.lang.reflect.Method |
setObject
How we set the associated continuation object |
protected static java.lang.reflect.Method |
suspendMethod
How we suspend the continuation |
Constructor Summary | |
---|---|
Continuation(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()
|
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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.lang.Class continuationClass
protected static java.lang.reflect.Method suspendMethod
protected static java.lang.reflect.Method resumeMethod
protected static java.lang.reflect.Method getObject
protected static java.lang.reflect.Method setObject
protected static boolean isJetty
Constructor Detail |
---|
public Continuation(HttpServletRequest request)
request
- The http requestMethod Detail |
---|
public boolean isAvailable()
public void suspend(long sleepTime) throws java.lang.Exception
sleepTime
- The maximum time to wait
java.lang.Exception
- If reflection breakspublic void resume() throws java.lang.Exception
java.lang.Exception
- If reflection breakspublic java.lang.Object getObject() throws java.lang.Exception
java.lang.Exception
- If reflection breakspublic void setObject(java.lang.Object object) throws java.lang.Exception
object
- the object associated with this continuation
java.lang.Exception
- If reflection breakspublic static void rethrowIfContinuation(java.lang.Throwable th)
th
- The exception to test for continuation-nesspublic static boolean isJetty()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |