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:
Continuation
Enclosing class:
SelectChannelConnector

private class SelectChannelConnector.RetryContinuation
extends Timeout.Task
implements Continuation


Field Summary
(package private)  SelectChannelConnector.HttpEndPoint _endPoint
           
(package private)  boolean _new
           
(package private)  Object _object
           
(package private)  boolean _pending
           
(package private)  boolean _resumed
           
(package private)  long _timeout
           
 
Constructor Summary
private SelectChannelConnector.RetryContinuation()
           
 
Method Summary
 void expire()
          Expire task.
 Object getObject()
          Arbitrary object associated with the continuation for context.
(package private)  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.
private  void redispatch()
           
 void resume()
          Resume the request.
(package private)  void setEndPoint(SelectChannelConnector.HttpEndPoint ep)
           
 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
 

Field Detail

_object

Object _object

_endPoint

SelectChannelConnector.HttpEndPoint _endPoint

_timeout

long _timeout

_new

boolean _new

_pending

boolean _pending

_resumed

boolean _resumed
Constructor Detail

SelectChannelConnector.RetryContinuation

private SelectChannelConnector.RetryContinuation()
Method Detail

setEndPoint

void setEndPoint(SelectChannelConnector.HttpEndPoint ep)

getTimeout

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.

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

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.

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

redispatch

private void redispatch()

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

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