public class SyncMessage extends Message
| Modifier and Type | Field and Description |
|---|---|
private java.io.Externalizable |
state
State to be synchronized.
|
ADDRESS_REPLY, ADDRESS_REQUEST, BEGIN_REPLY, ECHO, ECHO_REPLY, END_REPLY, INIT_CONVERSATION, INIT_REPLY, INIT_ROUTER, INIT_STANDARD, REPLY_ASYNC, REPLY_EXCEPTION_ASYNC, REPLY_EXCEPTION_SYNC, REPLY_SYNC, REQUEST_ASYNCH, REQUEST_SYNCH, UNKNOWN| Constructor and Description |
|---|
SyncMessage()
Default constructor, used during de-serialization.
|
SyncMessage(Message msg,
java.io.Externalizable state)
Constructs an instance using an already existing message.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.Externalizable |
getState()
Get the state from the message.
|
void |
readExternal(java.io.ObjectInput in)
Replacement for the default object reading method.
|
void |
setState(java.io.Externalizable state)
Set the state in the message.
|
void |
writeExternal(java.io.ObjectOutput out)
Replacement for the default object writing method.
|
getKey, getPayload, getRequestID, getType, isAsyncReply, isAsyncRequest, isDispatcherRequest, isEchoRequest, isReply, isRouterRequest, onRead, onWrite, setKey, setPayload, setRequestID, setTypepublic SyncMessage()
public SyncMessage(Message msg, java.io.Externalizable state)
msg - A valid message. Must not be null.state - The state to be piggybacked into the given message.public java.io.Externalizable getState()
public void setState(java.io.Externalizable state)
state - The state to be carried in this message.public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
Externalizable
it won't be called by the serialization infrastructure.readExternal in interface java.io.ExternalizablereadExternal in class Messagein - Input source from which fields will be restored.java.io.IOException - In case of I/O errors.java.lang.ClassNotFoundException - If payload can't be instantiated.public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
Externalizable
it won't be called by the serialization infrastructure.writeExternal in interface java.io.ExternalizablewriteExternal in class Messageout - The output destination to which fields will be saved.java.io.IOException - In case of I/O errors.