org.glassfish.grizzly.web.container.util
Class SelectionKeyAttachment
java.lang.Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UNLIMITED_TIMEOUT
public static final long UNLIMITED_TIMEOUT
- See Also:
- Constant Field Values
SelectionKeyAttachment
public SelectionKeyAttachment()
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.