|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Identifier
- the identification of the remote nodepublic interface P2PSocket<Identifier>
A socket in the layered transport layer.
Method Summary | |
---|---|
void |
close()
Closes this socket. |
Identifier |
getIdentifier()
The identification of the node at the other end of the socket. |
java.util.Map<java.lang.String,java.lang.Object> |
getOptions()
Details on the connectivity of the socket (encrypted, source-routed etc) |
long |
read(java.nio.ByteBuffer dsts)
Reads a sequence of bytes from this channel into a subsequence of the given buffer. |
void |
register(boolean wantToRead,
boolean wantToWrite,
P2PSocketReceiver<Identifier> 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)
Writes a sequence of bytes to this channel from a subsequence of the given buffers. |
Method Detail |
---|
java.util.Map<java.lang.String,java.lang.Object> getOptions()
Identifier getIdentifier()
long read(java.nio.ByteBuffer dsts) throws java.io.IOException
dsts
-
java.io.IOException
long write(java.nio.ByteBuffer srcs) throws java.io.IOException
java.io.IOException
void register(boolean wantToRead, boolean wantToWrite, P2PSocketReceiver<Identifier> receiver)
wantToRead
- if you want to read from this socketwantToWrite
- if you want to write to this socketreceiver
- will have receiveSelectResult() called on it
note that you must call select() each time receiveSelectResult() is called. This is so
your application can properly handle flow controlvoid shutdownOutput()
void close()
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |