本文整理汇总了Java中org.apache.axis2.clustering.ClusteringMessage类的典型用法代码示例。如果您正苦于以下问题:Java ClusteringMessage类的具体用法?Java ClusteringMessage怎么用?Java ClusteringMessage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ClusteringMessage类属于org.apache.axis2.clustering包,在下文中一共展示了ClusteringMessage类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: replyRequest
import org.apache.axis2.clustering.ClusteringMessage; //导入依赖的package包/类
public Serializable replyRequest(Serializable msg, Member invoker) {
if (log.isDebugEnabled()) {
log.debug("RPC request received by RpcMessagingHandler");
}
if (msg instanceof ClusteringMessage) {
ClusteringMessage clusteringMsg = (ClusteringMessage) msg;
try {
clusteringMsg.execute(configurationContext);
} catch (ClusteringFault e) {
String errMsg = "Cannot handle RPC message";
log.error(errMsg, e);
throw new RemoteProcessException(errMsg, e);
}
return clusteringMsg.getResponse();
} else {
throw new IllegalArgumentException("Invalid RPC message of type " + msg.getClass() +
" received");
}
}
示例2: sendClusterMessage
import org.apache.axis2.clustering.ClusteringMessage; //导入依赖的package包/类
/**
* Sends a cluster message to other members of the cluster.If message transmission fails it will
* create a thread which will attempt retry transmission for a predefined amount of retry attempts.
*
* @param message The message to be transmitted
*/
public static void sendClusterMessage(ClusteringMessage message) {
ClusteringAgent agent = createClusteringAgent();
if (agent == null) {
//log.error("Unable to send the clustering message as a clustering agent was not obtained.");
if (log.isDebugEnabled()) {
log.debug(String.format("Failed to send cluster message :%s ", message));
}
return;
}
try {
agent.sendMessage(message, true);
if (log.isDebugEnabled()) {
log.debug(String.format("Successfully transmitted cluster message :%s", message));
}
} catch (ClusteringFault e) {
if (log.isDebugEnabled()) {
log.error("Unable to send the clustering message.The system will now attempt to retry " +
"sending the message", e);
}
}
}
示例3: MesosMembershipScheme
import org.apache.axis2.clustering.ClusteringMessage; //导入依赖的package包/类
public MesosMembershipScheme(Map<String, Parameter> parameters, String primaryDomain, Config config,
HazelcastInstance primaryHazelcastInstance, List<ClusteringMessage> messageBuffer) {
this.parameters = parameters;
this.primaryHazelcastInstance = primaryHazelcastInstance;
this.messageBuffer = messageBuffer;
this.nwConfig = config.getNetworkConfig();
}