com.sun.grizzly.websockets
Class WebSocketSelectionKeyAttachment

java.lang.Object
  extended by com.sun.grizzly.util.SelectionKeyAttachment
      extended by com.sun.grizzly.util.SelectedKeyAttachmentLogic
          extended by com.sun.grizzly.websockets.WebSocketSelectionKeyAttachment
All Implemented Interfaces:
Runnable

public class WebSocketSelectionKeyAttachment
extends SelectedKeyAttachmentLogic
implements Runnable


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
WebSocketSelectionKeyAttachment(ServerNetworkHandler snh, ProcessorTask task, AsyncProcessorTask asyncTask)
           
 
Method Summary
 void enableRead()
           
 ServerNetworkHandler getHandler()
           
 SelectionKey getSelectionKey()
           
 boolean handleSelectedKey(SelectionKey key)
          Used for completely custom selector.select logic.
 void run()
           
 boolean timedOut(SelectionKey key)
          called when idle timeout detected.
 
Methods inherited from class com.sun.grizzly.util.SelectionKeyAttachment
getAttachment, getIdleTimeoutDelay, getKeySelectionListener, getTimeout, getTimeoutListener, release, setIdleTimeoutDelay, setKeySelectionListener, setTimeout, setTimeoutListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebSocketSelectionKeyAttachment

public WebSocketSelectionKeyAttachment(ServerNetworkHandler snh,
                                       ProcessorTask task,
                                       AsyncProcessorTask asyncTask)
Method Detail

timedOut

public boolean timedOut(SelectionKey key)
Description copied from class: SelectionKeyAttachment
called when idle timeout detected. return true if key should be canceled.

Overrides:
timedOut in class SelectionKeyAttachment
Returns:

handleSelectedKey

public boolean handleSelectedKey(SelectionKey key)
Description copied from class: SelectionKeyAttachment
Used for completely custom selector.select logic.

Overrides:
handleSelectedKey in class SelectionKeyAttachment
Returns:
true, if we want to continue the default interest processing, or false otherwise.

run

public void run()
Specified by:
run in interface Runnable

enableRead

public final void enableRead()

getSelectionKey

public SelectionKey getSelectionKey()

getHandler

public ServerNetworkHandler getHandler()


Copyright © 2012 Oracle Corporation. All Rights Reserved.