com.sun.grizzly
Class CallbackHandlerSelectionKeyAttachment

java.lang.Object
  extended by com.sun.grizzly.util.SelectionKeyAttachment
      extended by com.sun.grizzly.util.SelectionKeyActionAttachment
          extended by com.sun.grizzly.util.SelectionKeyAttachmentWrapper<CallbackHandler>
              extended by com.sun.grizzly.CallbackHandlerSelectionKeyAttachment

public class CallbackHandlerSelectionKeyAttachment
extends SelectionKeyAttachmentWrapper<CallbackHandler>

SelectionKey attachment, which wraps CallbackHandler

Author:
Alexey Stashok

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.grizzly.util.SelectionKeyAttachment
SelectionKeyAttachment.KeySelectionListener, SelectionKeyAttachment.TimeOutListener
 
Field Summary
 
Fields inherited from class com.sun.grizzly.util.SelectionKeyAttachment
DEREGISTERED, idleTimeoutDelay, keySelectionListener, timeout, timeoutListener, UNLIMITED_TIMEOUT
 
Constructor Summary
CallbackHandlerSelectionKeyAttachment(CallbackHandler callbackHandler)
          Creates the CallbackHandler to the SelectionKey CallbackHandler will not be attached directly, but wrapped with CallbackHandlerSelectionKeyAttachment
 
Method Summary
 void associateKey(SelectionKey selectionKey)
           
 long getTimeout()
          Callback handler never should lead to the timeout situation, as connections could use it, but perform IO operations in sync.
 void release(SelectionKey selectionKey)
           
 
Methods inherited from class com.sun.grizzly.util.SelectionKeyAttachmentWrapper
getAttachment, postProcess, process, setAttachment
 
Methods inherited from class com.sun.grizzly.util.SelectionKeyAttachment
getAttachment, getIdleTimeoutDelay, getKeySelectionListener, getTimeoutListener, handleSelectedKey, setIdleTimeoutDelay, setKeySelectionListener, setTimeout, setTimeoutListener, timedOut
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallbackHandlerSelectionKeyAttachment

public CallbackHandlerSelectionKeyAttachment(CallbackHandler callbackHandler)
Creates the CallbackHandler to the SelectionKey CallbackHandler will not be attached directly, but wrapped with CallbackHandlerSelectionKeyAttachment

Method Detail

associateKey

public void associateKey(SelectionKey selectionKey)

release

public void release(SelectionKey selectionKey)
Overrides:
release in class SelectionKeyAttachmentWrapper<CallbackHandler>

getTimeout

public long getTimeout()
Callback handler never should lead to the timeout situation, as connections could use it, but perform IO operations in sync. mode.

Overrides:
getTimeout in class SelectionKeyAttachment
Returns:
null


Copyright © 2012 Oracle Corporation. All Rights Reserved.