Rice Pastry API

org.mpisws.p2p.transport.peerreview.replay
Class RecordSocket<Identifier>

java.lang.Object
  extended by org.mpisws.p2p.transport.util.SocketWrapperSocket<Identifier,Identifier>
      extended by org.mpisws.p2p.transport.peerreview.replay.RecordSocket<Identifier>
All Implemented Interfaces:
P2PSocket<Identifier>, PeerReviewEvents

public class RecordSocket<Identifier>
extends SocketWrapperSocket<Identifier,Identifier>
implements PeerReviewEvents


Field Summary
 
Fields inherited from class org.mpisws.p2p.transport.util.SocketWrapperSocket
identifier, logger, options, socket
 
Fields inherited from interface org.mpisws.p2p.transport.peerreview.PeerReviewEvents
EVT_ACK, EVT_CHECKPOINT, EVT_INIT, EVT_RECV, EVT_SEND, EVT_SENDSIGN, EVT_SIGN, EVT_SOCKET_CAN_READ, EVT_SOCKET_CAN_RW, EVT_SOCKET_CAN_WRITE, EVT_SOCKET_CLOSE, EVT_SOCKET_CLOSED, EVT_SOCKET_EXCEPTION, EVT_SOCKET_OPEN_INCOMING, EVT_SOCKET_OPEN_OUTGOING, EVT_SOCKET_OPENED_OUTGOING, EVT_SOCKET_READ, EVT_SOCKET_WRITE
 
Constructor Summary
RecordSocket(Identifier identifier, P2PSocket<Identifier> socket, Logger logger, java.util.Map<java.lang.String,java.lang.Integer> options, int socketId, java.nio.ByteBuffer sib, SecureHistory history)
           
 
Method Summary
 long read(java.nio.ByteBuffer dsts)
          Reads a sequence of bytes from this channel into a subsequence of the given buffer.
 long write(java.nio.ByteBuffer srcs)
          Writes a sequence of bytes to this channel from a subsequence of the given buffers.
 
Methods inherited from class org.mpisws.p2p.transport.util.SocketWrapperSocket
close, getIdentifier, getOptions, register, shutdownOutput, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RecordSocket

public RecordSocket(Identifier identifier,
                    P2PSocket<Identifier> socket,
                    Logger logger,
                    java.util.Map<java.lang.String,java.lang.Integer> options,
                    int socketId,
                    java.nio.ByteBuffer sib,
                    SecureHistory history)
Method Detail

read

public long read(java.nio.ByteBuffer dsts)
          throws java.io.IOException
Description copied from interface: P2PSocket
Reads a sequence of bytes from this channel into a subsequence of the given buffer.

Specified by:
read in interface P2PSocket<Identifier>
Overrides:
read in class SocketWrapperSocket<Identifier,Identifier>
Returns:
Throws:
java.io.IOException

write

public long write(java.nio.ByteBuffer srcs)
           throws java.io.IOException
Description copied from interface: P2PSocket
Writes a sequence of bytes to this channel from a subsequence of the given buffers.

Specified by:
write in interface P2PSocket<Identifier>
Overrides:
write in class SocketWrapperSocket<Identifier,Identifier>
Throws:
java.io.IOException

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.