|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface for objects that service read and write operations on a socket for a single connection.
| Method Summary | |
boolean |
tryToRead()
Called when the socket channel is reported to be ready for reading. |
boolean |
tryToWrite()
Called when the socket channel is reported to be ready for writing. |
int |
validOps()
Returns a bit mask of SelectionKey.OP_XXX values that
represent the operations this handler supports. |
| Method Detail |
public boolean tryToRead()
throws java.io.IOException
java.io.IOException
public boolean tryToWrite()
throws java.io.IOException
java.io.IOExceptionpublic int validOps()
SelectionKey.OP_XXX values that
represent the operations this handler supports. Most typically, this
will be SelectionKey.OP_READ | SelectionKey.OP_WRITE.
However, some protocols can be read-only or write-only, in which case
only the appropriate value should be returned.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||