当前位置: 首页>>代码示例>>Java>>正文


Java ClusteringMessage类代码示例

本文整理汇总了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");
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:20,代码来源:RpcMessagingHandler.java

示例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);
        }
    }
}
 
开发者ID:wso2,项目名称:carbon-governance,代码行数:29,代码来源:ClusteringUtil.java

示例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();
}
 
开发者ID:wso2,项目名称:mesos-artifacts,代码行数:8,代码来源:MesosMembershipScheme.java


注:本文中的org.apache.axis2.clustering.ClusteringMessage类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。