|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.selector.SelectionKeyHandler
public class SelectionKeyHandler
This interface is designed to be a callback mechanism from the SelectorManager. Once the manager has determines that something has happened, it informs the appropriate SelectionKeyHandler via this interface. The SelectionKeyHandler which is interested in being notified of events relating to the SelectionKey should attach itself to the SelectionKey via the attach() method. The SelectorManager will then call that SelectionKeyHandler's methods.
Constructor Summary | |
---|---|
SelectionKeyHandler()
|
Method Summary | |
---|---|
void |
accept(java.nio.channels.SelectionKey key)
Method which is called when the key becomes acceptable. |
void |
connect(java.nio.channels.SelectionKey key)
Method which is called when the key becomes connectable. |
void |
modifyKey(java.nio.channels.SelectionKey key)
Method which should change the interestOps of the handler's key. |
void |
read(java.nio.channels.SelectionKey key)
Method which is called when the key becomes readable. |
void |
write(java.nio.channels.SelectionKey key)
Method which is called when the key becomes writable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SelectionKeyHandler()
Method Detail |
---|
public void modifyKey(java.nio.channels.SelectionKey key)
key
- The key in questionpublic void accept(java.nio.channels.SelectionKey key)
key
- The key which is acceptable.public void connect(java.nio.channels.SelectionKey key)
key
- The key which is connectable.public void read(java.nio.channels.SelectionKey key)
key
- The key which is readable.public void write(java.nio.channels.SelectionKey key)
key
- The key which is writable.
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |