org.glassfish.grizzly.web.container.util
Class SelectionKeyAttachment

java.lang.Object
  extended by org.glassfish.grizzly.web.container.util.SelectionKeyAttachment
Direct Known Subclasses:
SelectionKeyActionAttachment

public abstract class SelectionKeyAttachment
extends Object

Basic class for all SelectionKey attachments. Custom attachments should be inherited from it.

Author:
Alexey Stashok

Field Summary
static long UNLIMITED_TIMEOUT
           
 
Constructor Summary
SelectionKeyAttachment()
           
 
Method Summary
static Object getAttachment(SelectionKey key)
           
 long getIdleTimeoutDelay()
          returns the idle timeout delay.
 long getTimeout()
           
 void release(SelectionKey selectionKey)
           
 void setTimeout(long timeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNLIMITED_TIMEOUT

public static final long UNLIMITED_TIMEOUT
See Also:
Constant Field Values
Constructor Detail

SelectionKeyAttachment

public SelectionKeyAttachment()
Method Detail

getAttachment

public static Object getAttachment(SelectionKey key)

getTimeout

public long getTimeout()

getIdleTimeoutDelay

public long getIdleTimeoutDelay()
returns the idle timeout delay. default it returns Long.MIN_VALUE , meaning null. -1 means no timeout. subclass need to implement it.

Returns:

setTimeout

public void setTimeout(long timeout)

release

public void release(SelectionKey selectionKey)


Copyright © 2009 SUN Microsystems. All Rights Reserved.