org.glassfish.grizzly.http.server
Interface SuspendContext

All Known Implementing Classes:
Response.SuspendedContextImpl

public interface SuspendContext

Interface represents a context of the suspended Response.

Author:
Alexey Stashok

Method Summary
 CompletionHandler<Response> getCompletionHandler()
          Get the suspended Response CompletionHandler.
 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 setTimeout(long timeout, java.util.concurrent.TimeUnit timeunit)
          Set the suspended Response timeout.
 

Method Detail

getCompletionHandler

CompletionHandler<Response> getCompletionHandler()
Get the suspended Response CompletionHandler.

Returns:
the suspended Response CompletionHandler.

getTimeoutHandler

TimeoutHandler getTimeoutHandler()
Get the suspended Response TimeoutHandler.

Returns:
the suspended Response TimeoutHandler.

getTimeout

long getTimeout(java.util.concurrent.TimeUnit timeunit)
Get the suspended Response timeout. If returned value less or equal to zero - timeout is not set.

Returns:
the suspended Response timeout. If returned value less or equal to zero - timeout is not set.

setTimeout

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

Parameters:
timeout - the suspended Response timeout.
timeunit - timeout units.

isSuspended

boolean isSuspended()
Returns true, if the Response is suspended, or false otherwise.

Returns:
true, if the Response is suspended, or false otherwise.


Copyright © 2011 Oracle Corpration. All Rights Reserved.