|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object CTL.Measure CTL.Types.Header
public class Header
CTL protocol header
Field Summary | |
---|---|
private int |
logID
Logical ID |
private boolean |
needSwap
Whether or not swapping is required |
private PeerID |
pid
Sender PeerID |
private long |
size
Payload size |
private int |
tag
Message tag |
Constructor Summary | |
---|---|
Header()
|
|
Header(long size,
int tag,
GroupInfo grp)
Constructor which gets the PeerID from a GroupInfo object |
|
Header(long size,
int tag,
IPaddr host,
int port,
int logID)
Constructor with host and port |
|
Header(long size,
int tag,
PeerID pid,
int logID)
Default constructor |
Method Summary | |
---|---|
long |
getSize()
Retrieve payload size |
boolean |
needSwap()
Determine if swapping is required |
PeerID |
pid()
Retrieve the PeerID |
void |
read(SerialIn in)
Serial read function |
void |
setSize(long size)
Set payload size |
int |
tag()
Retrieve the message tag |
java.lang.String |
toString()
Retrieve a string representation of this object |
void |
write(SerialOut out)
Serial write function |
Methods inherited from class CTL.Measure |
---|
size |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private long size
private int tag
private PeerID pid
private int logID
private boolean needSwap
Constructor Detail |
---|
public Header(long size, int tag, PeerID pid, int logID)
public Header(long size, int tag, IPaddr host, int port, int logID)
public Header(long size, int tag, GroupInfo grp)
public Header()
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public void setSize(long size)
size
- Payload sizepublic long getSize()
public PeerID pid()
public int tag()
public void read(SerialIn in) throws java.io.IOException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
read
in interface Writable
in
- Input stream
java.io.IOException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
public void write(SerialOut out) throws java.io.IOException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, CTLException
write
in interface Writable
out
- Output stream
java.io.IOException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
CTLException
public boolean needSwap()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |