com.sun.grizzly.tcp
Class Response.ResponseAttachment<A>
java.lang.Object
com.sun.grizzly.tcp.Response.ResponseAttachment<A>
- All Implemented Interfaces:
- SelectionKeyAttachment.KeySelectionListener, SelectionKeyAttachment.TimeOutListener
- Enclosing class:
- Response<A>
public static class Response.ResponseAttachment<A>
- extends Object
- implements SelectionKeyAttachment.KeySelectionListener, SelectionKeyAttachment.TimeOutListener
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
lock
protected volatile ReentrantLock lock
threadAttachment
protected volatile ThreadAttachment threadAttachment
Response.ResponseAttachment
protected Response.ResponseAttachment(long idleTimeoutDelay,
A attachment,
CompletionHandler<? super A> completionHandler,
Response response)
getAttachment
public A getAttachment()
getCompletionHandler
public CompletionHandler<? super A> getCompletionHandler()
resetTimeout
public void resetTimeout()
getTimeout
public long getTimeout()
getIdleTimeoutDelay
public long getIdleTimeoutDelay()
setIdleTimeoutDelay
public void setIdleTimeoutDelay(long idleTimeoutDelay)
invokeCompletionHandler
public void invokeCompletionHandler()
resume
public void resume()
onTimeOut
public final boolean onTimeOut(SelectionKey key)
- Specified by:
onTimeOut
in interface SelectionKeyAttachment.TimeOutListener
onKeySelected
public void onKeySelected(SelectionKey selectionKey)
- Specified by:
onKeySelected
in interface SelectionKeyAttachment.KeySelectionListener
timeout
public boolean timeout()
- Method will be called to notify about async HTTP processing timeout
- Returns:
- true, if async processing has been finished, or false
if we should re-register the channel to continue async HTTP request processing
cancel
public void cancel()
Copyright © 2012 Oracle Corporation. All Rights Reserved.