org.directwebremoting.impl
Class GrizzlyContinuationSleeper

java.lang.Object
  extended by org.directwebremoting.impl.GrizzlyContinuationSleeper
All Implemented Interfaces:
java.io.Serializable, Sleeper

public class GrizzlyContinuationSleeper
extends java.lang.Object
implements Sleeper

A Sleeper that works with Grizzly Continuations

Author:
Jeanfrancois Arcand [jeanfrancois dot arcand at sun dot com]
See Also:
Serialized Form

Field Summary
static java.lang.String ATTRIBUTE_JETTY_CONDUIT
          We remember the notify conduit so we can reuse it
 
Constructor Summary
GrizzlyContinuationSleeper(javax.servlet.http.HttpServletRequest request)
           
 
Method Summary
 void goToSleep(java.lang.Runnable awakening)
          'halt' the current execution in some way.
 void wakeUp()
          This method should attempt to resume the execution.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTE_JETTY_CONDUIT

public static final java.lang.String ATTRIBUTE_JETTY_CONDUIT
We remember the notify conduit so we can reuse it

See Also:
Constant Field Values
Constructor Detail

GrizzlyContinuationSleeper

public GrizzlyContinuationSleeper(javax.servlet.http.HttpServletRequest request)
Parameters:
request - The request into which we store this as an attribute
Method Detail

goToSleep

public void goToSleep(java.lang.Runnable awakening)
Description copied from interface: Sleeper
'halt' the current execution in some way. This method should be the last meaningful thing that is done on a request, and work that needs to be done before completion should be done in a Runnable so the system can schedule it at an appropriate time.

Specified by:
goToSleep in interface Sleeper
Parameters:
awakening - The action to take when Sleeper.wakeUp() is called

wakeUp

public void wakeUp()
Description copied from interface: Sleeper
This method should attempt to resume the execution. It is possible that this method will be called more than once at the same time so Sleepers should be prepared take steps to be woken only once.

Specified by:
wakeUp in interface Sleeper

Copyright ¬ 2005