org.glassfish.grizzly.http.server
Class Response.SuspendedContextImpl

java.lang.Object
  extended by org.glassfish.grizzly.http.server.Response.SuspendedContextImpl
All Implemented Interfaces:
Connection.CloseListener, SuspendContext
Enclosing class:
Response

public final class Response.SuspendedContextImpl
extends java.lang.Object
implements SuspendContext, Connection.CloseListener


Constructor Summary
Response.SuspendedContextImpl()
           
 
Method Summary
 CompletionHandler<Response> getCompletionHandler()
          Get the suspended Response CompletionHandler.
 SuspendStatus getSuspendStatus()
           
 long getTimeout(java.util.concurrent.TimeUnit timeunit)
          Get the suspended Response timeout.
 TimeoutHandler getTimeoutHandler()
          Get the suspended Response TimeoutHandler.
 boolean isSuspended()
          Returns true, if the Response is suspended, or false otherwise.
 void markCancelled()
          Marks Response as cancelled, but doesn't resume associated FilterChainContext invocation.
 void markResumed()
          Marks Response as resumed, but doesn't resume associated FilterChainContext invocation.
 void onClosed(Connection connection, Connection.CloseType closeType)
           
 void setTimeout(long timeout, java.util.concurrent.TimeUnit timeunit)
          Set the suspended Response timeout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Response.SuspendedContextImpl

public Response.SuspendedContextImpl()
Method Detail

markResumed

public void markResumed()
Marks Response as resumed, but doesn't resume associated FilterChainContext invocation.


markCancelled

public void markCancelled()
Marks Response as cancelled, but doesn't resume associated FilterChainContext invocation.


onClosed

public void onClosed(Connection connection,
                     Connection.CloseType closeType)
              throws java.io.IOException
Specified by:
onClosed in interface Connection.CloseListener
Throws:
java.io.IOException

getCompletionHandler

public CompletionHandler<Response> getCompletionHandler()
Description copied from interface: SuspendContext
Get the suspended Response CompletionHandler.

Specified by:
getCompletionHandler in interface SuspendContext
Returns:
the suspended Response CompletionHandler.

getTimeoutHandler

public TimeoutHandler getTimeoutHandler()
Description copied from interface: SuspendContext
Get the suspended Response TimeoutHandler.

Specified by:
getTimeoutHandler in interface SuspendContext
Returns:
the suspended Response TimeoutHandler.

getTimeout

public long getTimeout(java.util.concurrent.TimeUnit timeunit)
Description copied from interface: SuspendContext
Get the suspended Response timeout. If returned value less or equal to zero - timeout is not set.

Specified by:
getTimeout in interface SuspendContext
Returns:
the suspended Response timeout. If returned value less or equal to zero - timeout is not set.

setTimeout

public void setTimeout(long timeout,
                       java.util.concurrent.TimeUnit timeunit)
Description copied from interface: SuspendContext
Set the suspended Response timeout. If timeout value less or equal to zero - suspended Response won't be never timed out.

Specified by:
setTimeout in interface SuspendContext
Parameters:
timeout - the suspended Response timeout.
timeunit - timeout units.

isSuspended

public boolean isSuspended()
Description copied from interface: SuspendContext
Returns true, if the Response is suspended, or false otherwise.

Specified by:
isSuspended in interface SuspendContext
Returns:
true, if the Response is suspended, or false otherwise.

getSuspendStatus

public SuspendStatus getSuspendStatus()


Copyright © 2012 Oracle Corporation. All Rights Reserved.