public class ClusterMessage extends Object implements Serializable
Base object for messages passed between cluster nodes using the message topic.
Constructor and Description |
---|
ClusterMessage(String targetNode,
ClusterNode fromNode,
int msgType)
Class constructor
|
ClusterMessage(String targetNode,
int msgType)
Class constructor
|
ClusterMessage(String targetNode,
String fromNode,
int msgType)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
String |
getFromNode()
Return the from node
|
String |
getTargetNode()
Return the target node name
|
boolean |
hasFromNode()
Check if the from node is valid
|
boolean |
isAllNodes()
Check if the target is all nodes
|
boolean |
isFromLocalNode(ClusterNode localNode)
Check if the message was sent by the local node
|
int |
isType()
Return the message type
|
String |
toString()
Return the cluster message as a string
|
public static final String AllNodes
public ClusterMessage(String targetNode, int msgType)
targetNode
- StringmsgType
- intpublic ClusterMessage(String targetNode, String fromNode, int msgType)
targetNode
- StringfromNode
- StringmsgType
- intpublic ClusterMessage(String targetNode, ClusterNode fromNode, int msgType)
targetNode
- StringfromNode
- ClusterNodemsgType
- intpublic final String getTargetNode()
public final boolean isAllNodes()
public final int isType()
public final boolean hasFromNode()
public final String getFromNode()
public final boolean isFromLocalNode(ClusterNode localNode)
localNode
- ClusterNodeCopyright © 2005–2017 Alfresco Software. All rights reserved.