org.mortbay.jetty.nio
Class SelectChannelConnector.RetryContinuation

java.lang.Object
  extended by org.mortbay.thread.Timeout.Task
      extended by org.mortbay.jetty.nio.SelectChannelConnector.RetryContinuation
All Implemented Interfaces:
Runnable, Continuation
Enclosing class:
SelectChannelConnector

public static class SelectChannelConnector.RetryContinuation
extends Timeout.Task
implements Continuation, Runnable


Constructor Summary
SelectChannelConnector.RetryContinuation()
           
 
Method Summary
 void expire()
          Expire task.
 Object getObject()
          Arbitrary object associated with the continuation for context.
 long getTimeout()
           
 boolean isNew()
          Is this a newly created Continuation.
 boolean isPending()
          Get the pending status? A continuation is pending while the handling of a call to suspend has not completed.
 boolean isResumed()
          Get the resumed status?
 void reset()
          Reset the continuation.
 void resume()
          Resume the request.
 void run()
           
 boolean schedule()
           
 void setObject(Object object)
          Arbitrary object associated with the continuation for context.
 boolean suspend(long timeout)
          Suspend handling.
 
Methods inherited from class org.mortbay.thread.Timeout.Task
cancel, isExpired, reschedule, schedule, schedule, setNext, unlink
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectChannelConnector.RetryContinuation

public SelectChannelConnector.RetryContinuation()
Method Detail

expire

public void expire()
Description copied from class: Timeout.Task
Expire task. This method is called when the timeout expires.

Overrides:
expire in class Timeout.Task

getObject

public Object getObject()
Description copied from interface: Continuation
Arbitrary object associated with the continuation for context.

Specified by:
getObject in interface Continuation
Returns:
An arbitrary object associated with the continuation

getTimeout

public long getTimeout()

isNew

public boolean isNew()
Description copied from interface: Continuation
Is this a newly created Continuation.

A newly created continuation has not had #getEvent(long) called on it.

Specified by:
isNew in interface Continuation
Returns:
True if the continuation has just been created and has not yet suspended the request.

isPending

public boolean isPending()
Description copied from interface: Continuation
Get the pending status? A continuation is pending while the handling of a call to suspend has not completed. For blocking continuations, pending is true only during the call to Continuation.suspend(long). For non-blocking continuations, pending is true until a second call to Continuation.suspend(long), thus this method can be used to determine if a request is being retried.

Specified by:
isPending in interface Continuation
Returns:
True if the continuation is handling a call to suspend.

isResumed

public boolean isResumed()
Description copied from interface: Continuation
Get the resumed status?

Specified by:
isResumed in interface Continuation
Returns:
True if the continuation is has been resumed.

reset

public void reset()
Description copied from interface: Continuation
Reset the continuation. Cancel any pending status of the continuation.

Specified by:
reset in interface Continuation

resume

public void resume()
Description copied from interface: Continuation
Resume the request. Resume a suspended request. The passed event will be returned in the getObject method.

Specified by:
resume in interface Continuation

run

public void run()
Specified by:
run in interface Runnable

schedule

public boolean schedule()

setObject

public void setObject(Object object)
Description copied from interface: Continuation
Arbitrary object associated with the continuation for context.

Specified by:
setObject in interface Continuation
Parameters:
object - An arbitrary object to associate with the continuation

suspend

public boolean suspend(long timeout)
Description copied from interface: Continuation
Suspend handling. This method will suspend the request for the timeout or until resume is called.

Specified by:
suspend in interface Continuation
Returns:
True if resume called or false if timeout.