org.mpisws.p2p.transport.util
Class BufferReaderWriter<Identifier>
java.lang.Object
org.mpisws.p2p.transport.util.BufferReaderWriter<Identifier>
public class BufferReaderWriter<Identifier>
- extends java.lang.Object
Concurrently reads a buffer and writes a buffer at the same time,
then calls the continuation when done.
- Author:
- Jeff Hoye
Method Summary |
void |
done(java.lang.Exception e)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BufferReaderWriter
public BufferReaderWriter(P2PSocket<Identifier> sock,
java.nio.ByteBuffer writeMe,
boolean writeSize,
Continuation<java.nio.ByteBuffer,java.lang.Exception> c)
BufferReaderWriter
public BufferReaderWriter(P2PSocket<Identifier> sock,
java.nio.ByteBuffer writeMe,
boolean writeSize,
Continuation<java.nio.ByteBuffer,java.lang.Exception> c,
int readSize)
- Parameters:
sock
- the socket to read/write from/towriteMe
- the bytes to writewriteSize
- true if I should write a size header before the buffer, false if it's fixed sizec
- the continuation to notifyreadSize
- the size of the buffer to read, -1 if it should read a size header first
done
public void done(java.lang.Exception e)
Copyright © 2001-2005 - Rice Pastry.