|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mpisws.p2p.transport.sourceroute.manager.SourceRouteManagerP2PSocket<Identifier>
public class SourceRouteManagerP2PSocket<Identifier>
Constructor Summary | |
---|---|
SourceRouteManagerP2PSocket(P2PSocket<SourceRoute<Identifier>> socket,
Environment env)
|
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.Integer> |
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. |
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,
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. |
long |
write(java.nio.ByteBuffer[] srcs,
int offset,
int length)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SourceRouteManagerP2PSocket(P2PSocket<SourceRoute<Identifier>> socket, Environment env)
Method Detail |
---|
public void close()
P2PSocket
close
in interface P2PSocket<Identifier>
public Identifier getIdentifier()
P2PSocket
getIdentifier
in interface P2PSocket<Identifier>
public long read(java.nio.ByteBuffer dsts) throws java.io.IOException
P2PSocket
read
in interface P2PSocket<Identifier>
java.io.IOException
public long read(java.nio.ByteBuffer[] dsts, int offset, int length) throws java.io.IOException
P2PSocket
read
in interface P2PSocket<Identifier>
java.io.IOException
public void register(boolean wantToRead, boolean wantToWrite, P2PSocketReceiver<Identifier> receiver)
P2PSocket
register
in interface P2PSocket<Identifier>
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 controlpublic void shutdownOutput()
P2PSocket
shutdownOutput
in interface P2PSocket<Identifier>
public long write(java.nio.ByteBuffer srcs) throws java.io.IOException
P2PSocket
write
in interface P2PSocket<Identifier>
java.io.IOException
public long write(java.nio.ByteBuffer[] srcs, int offset, int length) throws java.io.IOException
write
in interface P2PSocket<Identifier>
java.io.IOException
public java.util.Map<java.lang.String,java.lang.Integer> getOptions()
P2PSocket
getOptions
in interface P2PSocket<Identifier>
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |