public class ClusterMessage extends Object
| Constructor and Description | 
|---|
ClusterMessage(NodeId sender,
              MessageSubject subject,
              byte[] payload)
Creates a cluster message. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
equals(Object o)  | 
static ClusterMessage | 
fromBytes(byte[] bytes)
Decodes a new ClusterMessage from raw bytes. 
 | 
byte[] | 
getBytes()
Serializes this instance. 
 | 
int | 
hashCode()  | 
byte[] | 
payload()
Returns the message payload. 
 | 
void | 
respond(byte[] data)
Records the response to be sent to the sender. 
 | 
byte[] | 
response()
Returns the response to be sent to the sender. 
 | 
NodeId | 
sender()
Returns the id of the controller sending this message. 
 | 
MessageSubject | 
subject()
Returns the message subject indicator. 
 | 
String | 
toString()  | 
public ClusterMessage(NodeId sender, MessageSubject subject, byte[] payload)
sender - message sendersubject - message subjectpayload - message payloadpublic NodeId sender()
public MessageSubject subject()
public byte[] payload()
public void respond(byte[] data)
data - response payloadpublic byte[] response()
public byte[] getBytes()
public static ClusterMessage fromBytes(byte[] bytes)
bytes - raw bytes