|
Rice Pastry API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Interface for sending bulk data from the application. Mimics java's non-blocking SocketChannel interface this should make it easier to implement in any Java-based p2p overlay.
| Method Summary | |
void |
close()
Closes this socket. |
long |
read(java.nio.ByteBuffer[] dsts,
int offset,
int length)
Reads a sequence of bytes from this channel into a subsequence of the given buffers. |
void |
register(boolean wantToRead,
boolean wantToWrite,
int timeout,
AppSocketReceiver receiver)
Must be called every time a Read/Write occurs to continue operation. |
void |
shutdownOutput()
Disables the output stream for this socket. |
long |
write(java.nio.ByteBuffer[] srcs,
int offset,
int length)
Writes a sequence of bytes to this channel from a subsequence of the given buffers. |
| Method Detail |
public long read(java.nio.ByteBuffer[] dsts,
int offset,
int length)
throws java.io.IOException
dsts - DESCRIBE THE PARAMETERoffset - DESCRIBE THE PARAMETERlength - DESCRIBE THE PARAMETER
java.io.IOException - DESCRIBE THE EXCEPTION
public long write(java.nio.ByteBuffer[] srcs,
int offset,
int length)
throws java.io.IOException
srcs - DESCRIBE THE PARAMETERoffset - DESCRIBE THE PARAMETERlength - DESCRIBE THE PARAMETER
java.io.IOException
public void register(boolean wantToRead,
boolean wantToWrite,
int timeout,
AppSocketReceiver receiver)
wantToRead - DESCRIBE THE PARAMETERwantToWrite - DESCRIBE THE PARAMETERtimeout - DESCRIBE THE PARAMETERreceiver - DESCRIBE THE PARAMETERpublic void shutdownOutput()
public void close()
|
Rice Pastry API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||