JavaGroups
Class Header
java.lang.Object
|
+--JavaGroups.Header
- public class Header
- extends java.lang.Object
- implements java.io.Externalizable, java.lang.Cloneable
Container for header data which is added to the front of a Message by a protocol layer
when traveling down the stack. When traveling up on the other side, each protocol layer
will remove its Header. Headers can only contain objects, which have to be serializable
(or support externalization). Both the object and its byte representation are maintained
for faster access of its contents,
but the byte buffer is only created when needed (e.g. when Size() or writeExternal()
is called) ! .
- See Also:
- Serialized Form
|
Constructor Summary |
Header()
|
Header(byte[] data,
java.lang.Object obj)
|
Header(java.lang.Object obj)
|
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Header
public Header()
Header
public Header(java.lang.Object obj)
Header
public Header(byte[] data,
java.lang.Object obj)
SetObject
public void SetObject(java.lang.Object obj)
GetObject
public java.lang.Object GetObject()
Size
public long Size()
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- Specified by:
- writeExternal in interface java.io.Externalizable
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
- readExternal in interface java.io.Externalizable
main
public static void main(java.lang.String[] args)