public class SyncMessage extends Message
Modifier and Type | Field and Description |
---|---|
private java.io.Serializable |
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.Serializable state)
Constructs an instance using an already existing message.
|
Modifier and Type | Method and Description |
---|---|
java.io.Serializable |
getState()
Get the state from the message.
|
void |
readExternal(java.io.ObjectInput in)
Replacement for the default object reading method.
|
void |
setState(java.io.Serializable 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, setKey, setPayload, setRequestID, setType
public SyncMessage()
public SyncMessage(Message msg, java.io.Serializable state)
msg
- A valid message. Must not be null
.state
- The state to be piggybacked into the given message.public java.io.Serializable getState()
public void setState(java.io.Serializable 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.Externalizable
readExternal
in class Message
in
- 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.Externalizable
writeExternal
in class Message
out
- The output destination to which fields will be saved.java.io.IOException
- In case of I/O errors.