|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jgroup.relacs.mss.FragmentHeader
public final class FragmentHeader
This class contains the mss level fragment header data.
Field Summary |
---|
Fields inherited from interface jgroup.relacs.mss.MssTag |
---|
ASYN, CONGESTION, EXTERNFC, FWDROUTING, IAMALIVE, JG, LOCALFC, NACK, NOTLASTFRAGMENT, PING_OBJECT, QSYN, REMOTENACK, ROUTING, SENT, SENTNACK, SYN, TAGTYPE, TOPOLOGY |
Fields inherited from interface jgroup.relacs.mss.MssConstants |
---|
ALL, EHANDLER_PRIORITY, HEADER_SIZE, MINIMUM_ALIVE_VALUE, MSS_HEADER_SIZE, MSSUSER_PRIORITY, NACKSUPPRESSION, NI_PRIORITY, OVERHEAD_SIZE, ROUTING_ENABLED, TRAILER_SIZE, UNDEF, UNREACHABLE |
Method Summary | |
---|---|
void |
broadcastOff()
|
byte[] |
getFragment()
Returns the message fragment associated with this header. |
int |
getFragmentLength()
Returns the length of the fragment associated with this header. |
int |
getIncarnationId()
Returns incarnation identifier for the sender of this message. |
MssHost |
getSender()
Returns the sender of this message fragment. |
byte |
getTag()
Returns the tag associated with this message. |
boolean |
isBroadcast()
Returns true if this message is a broadcast message. |
boolean |
isLocal()
Returns true if the sender of this message is the local host. |
static void |
marshal(boolean broadcast,
int fragId,
byte[] outstream)
Marshals the given FragmentHeader values into the
specified byte[] outstream , without creating an
object. |
static byte[] |
marshal(byte tag,
boolean broadcast,
int fragId)
Marshals the given FragmentHeader values into a byte
array and returns it. |
static void |
marshal(byte tag,
boolean broadcast,
int fragId,
byte[] outstream)
Marshals the given FragmentHeader values into the
specified byte[] outstream , without creating an
object. |
void |
setTag(byte tag)
Set the tag associated with this message. |
java.lang.String |
toString()
Print the content of the FragmentHeader . |
static FragmentHeader |
unmarshal(jgroup.relacs.mss.MssDS mssds,
byte[] instream,
int fragLen)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static byte[] marshal(byte tag, boolean broadcast, int fragId)
FragmentHeader
values into a byte
array and returns it. The size of the array is equal to the
fragment header standard size. This method is useful if we want
to send a single message fragment, in which only the tag reveals
the semantics of the message. For example to notify others of
some event, that does not need additional data.
At the sender side, we don't keep any of the input parameters, we
just marshal it directly into the created outstream
byte array that is returned from this method.
public static void marshal(boolean broadcast, int fragId, byte[] outstream)
FragmentHeader
values into the
specified byte[] outstream
, without creating an
object. This marshal method does not change the sender related
fields, such as the inet address, port and incarnation identifier.
It will only set the broadcast and fragment identifier values.
At the sender side, we don't keep any of the input parameters, we
just marshal it directly into the outstream
byte
array.
public static void marshal(byte tag, boolean broadcast, int fragId, byte[] outstream)
FragmentHeader
values into the
specified byte[] outstream
, without creating an
object.
At the sender side, we don't keep any of the input parameters, we
just marshal it directly into the outstream
byte
array.
public static FragmentHeader unmarshal(jgroup.relacs.mss.MssDS mssds, byte[] instream, int fragLen) throws java.io.IOException, java.lang.ClassNotFoundException, JgroupException
java.io.IOException
java.lang.ClassNotFoundException
JgroupException
public byte getTag()
public void setTag(byte tag)
public byte[] getFragment()
public int getFragmentLength()
public MssHost getSender()
public int getIncarnationId()
public boolean isLocal()
public boolean isBroadcast()
public void broadcastOff()
public java.lang.String toString()
FragmentHeader
.
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |