|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.catalina.tribes.ByteMessage
public class ByteMessage
A byte message is not serialized and deserialized by the channel
instead it is sent as a byte array
By default Tribes uses java serialization when it receives an object
to be sent over the wire. Java serialization is not the most
efficient of serializing data, and Tribes might not even
have access to the correct class loaders to deserialize the object properly.
The ByteMessage class is a class where the channel when it receives it will
not attempt to perform serialization, instead it will simply stream the getMessage()
bytes.
If you are using multiple applications on top of Tribes you should add some sort of header
so that you can decide with the ChannelListener.accept()
whether this message was intended
for you.
Constructor Summary | |
---|---|
ByteMessage()
Creates an empty byte message Constructor also for deserialization |
|
ByteMessage(byte[] data)
Creates a byte message wit h |
Method Summary | |
---|---|
byte[] |
getMessage()
Returns the message contents of this byte message |
void |
readExternal(java.io.ObjectInput in)
|
void |
setMessage(byte[] message)
Sets the message contents of this byte message |
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ByteMessage()
public ByteMessage(byte[] data)
data
- byte[] - the message contentsMethod Detail |
---|
public byte[] getMessage()
public void setMessage(byte[] message)
message
- byte[]public void readExternal(java.io.ObjectInput in) throws java.io.IOException
readExternal
in interface java.io.Externalizable
in
- ObjectInput
java.io.IOException
Externalizable.readExternal(java.io.ObjectInput)
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- ObjectOutput
java.io.IOException
Externalizable.writeExternal(java.io.ObjectOutput)
|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |