|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrice.pastry.socket.SocketBuffer
public class SocketBuffer
Holds 1 serialized message for receiving or sending. Has specialized code for RouteMessage, Liveness Message, and byte arrays.
Field Summary | |
---|---|
static int |
DEFAULT_BUFFER_SIZE
|
Constructor Summary | |
---|---|
SocketBuffer(byte[] output)
|
|
SocketBuffer(byte[] input,
SocketPastryNode spn)
|
|
SocketBuffer(EpochInetSocketAddress address,
SourceRoute path)
For a quick write. |
|
SocketBuffer(EpochInetSocketAddress address,
SourceRoute path,
PRawMessage msg)
|
|
SocketBuffer(MessageDeserializer defaultDeserializer,
NodeHandleFactory nhf)
Main Constructor |
|
SocketBuffer(PRawMessage rm)
For quick write |
|
SocketBuffer(SourceRoute path,
int appId)
Used to initialize the sourceroute path. |
Method Summary | |
---|---|
Message |
deserialize(MessageDeserializer md)
|
int |
getAddress()
|
java.nio.ByteBuffer |
getBuffer()
|
byte[] |
getBytes()
|
int |
getInnermostAddress()
|
short |
getInnermostType()
|
SendOptions |
getOptions()
|
RouteMessage |
getRouteMessage()
|
short |
getType()
|
protected void |
initialize(int size)
|
boolean |
isRouteMessage()
|
void |
serialize(PRawMessage msg,
boolean reset)
Will grow the buffer as needed |
void |
setType(short type)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_BUFFER_SIZE
Constructor Detail |
---|
public SocketBuffer(byte[] output)
public SocketBuffer(byte[] input, SocketPastryNode spn) throws java.io.IOException
java.io.IOException
public SocketBuffer(PRawMessage rm) throws java.io.IOException
rm
- logger
-
java.io.IOException
public SocketBuffer(EpochInetSocketAddress address, SourceRoute path) throws java.io.IOException
java.io.IOException
public SocketBuffer(EpochInetSocketAddress address, SourceRoute path, PRawMessage msg) throws java.io.IOException
java.io.IOException
public SocketBuffer(SourceRoute path, int appId) throws java.io.IOException
path
- appId
-
java.io.IOException
public SocketBuffer(MessageDeserializer defaultDeserializer, NodeHandleFactory nhf)
defaultDeserializer
- Method Detail |
---|
protected void initialize(int size)
public boolean isRouteMessage()
public SendOptions getOptions()
public RouteMessage getRouteMessage()
public void serialize(PRawMessage msg, boolean reset) throws java.io.IOException
msg
-
java.io.IOException
public java.nio.ByteBuffer getBuffer()
public byte[] getBytes()
public int getAddress()
getAddress
in interface RawMessageDelivery
public Message deserialize(MessageDeserializer md) throws java.io.IOException
deserialize
in interface RawMessageDelivery
java.io.IOException
public short getInnermostType()
public int getInnermostAddress()
public short getType()
public void setType(short type)
public java.lang.String toString()
toString
in class java.lang.Object
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |