public class ClusterMessage
extends java.lang.Object
implements java.io.Serializable
Base object for messages passed between cluster nodes using the message topic.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
AllNodes |
| Constructor and Description |
|---|
ClusterMessage(java.lang.String targetNode,
ClusterNode fromNode,
int msgType)
Class constructor
|
ClusterMessage(java.lang.String targetNode,
int msgType)
Class constructor
|
ClusterMessage(java.lang.String targetNode,
java.lang.String fromNode,
int msgType)
Class constructor
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getFromNode()
Return the from node
|
java.lang.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
|
java.lang.String |
toString()
Return the cluster message as a string
|
public static final java.lang.String AllNodes
public ClusterMessage(java.lang.String targetNode,
int msgType)
targetNode - StringmsgType - intpublic ClusterMessage(java.lang.String targetNode,
java.lang.String fromNode,
int msgType)
targetNode - StringfromNode - StringmsgType - intpublic ClusterMessage(java.lang.String targetNode,
ClusterNode fromNode,
int msgType)
targetNode - StringfromNode - ClusterNodemsgType - intpublic final java.lang.String getTargetNode()
public final boolean isAllNodes()
public final int isType()
public final boolean hasFromNode()
public final java.lang.String getFromNode()
public final boolean isFromLocalNode(ClusterNode localNode)
localNode - ClusterNodepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.