public class ClusterMessage extends Object
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getData()
Return the raw message data.
|
String |
getRegisterHost()
Return the register host for online/offline message.
|
boolean |
isRegister()
Return true if register is true for a online/offline message.
|
boolean |
isRegisterEvent()
Return true if this is a register event as opposed to a transaction message.
|
static ClusterMessage |
read(DataInputStream dataInput)
Read the message from binary form.
|
static ClusterMessage |
register(String registerHost,
boolean register)
Create a register message.
|
String |
toString() |
static ClusterMessage |
transEvent(byte[] data)
Create a transaction message.
|
void |
write(DataOutputStream dataOutput)
Write the message in binary form.
|
public static ClusterMessage register(String registerHost, boolean register)
public static ClusterMessage transEvent(byte[] data)
public boolean isRegisterEvent()
public String getRegisterHost()
public boolean isRegister()
public byte[] getData()
public void write(DataOutputStream dataOutput) throws IOException
IOExceptionpublic static ClusterMessage read(DataInputStream dataInput) throws IOException
IOExceptionCopyright © 2016. All rights reserved.