Java 类org.apache.catalina.tribes.transport.MultiPointSender 实例源码

项目:wso2-axis2    文件:TribesClusteringAgent.java   
/**
 * Set the maximum number of retries, if message sending to a particular node fails
 */
private void setMaximumRetries() {
    Parameter maxRetriesParam = getParameter(TribesConstants.MAX_RETRIES);
    int maxRetries = 10;
    if (maxRetriesParam != null) {
        maxRetries = Integer.parseInt((String) maxRetriesParam.getValue());
    }
    ReplicationTransmitter replicationTransmitter =
            (ReplicationTransmitter) channel.getChannelSender();
    MultiPointSender multiPointSender = replicationTransmitter.getTransport();
    multiPointSender.setMaxRetryAttempts(maxRetries);
}