com.app.common.loadbalance.NoneLoadBalance Maven / Gradle / Ivy
The newest version!
package com.app.common.loadbalance;
import com.gw.common.utils.GwClient;
/**
* 默认策略
* @author deshuai.kong
*
*/
public class NoneLoadBalance extends AbstractLoadBalance {
public NoneLoadBalance(LoadBalanceManager loadBalanceManager) {
super(loadBalanceManager);
// TODO Auto-generated constructor stub
}
@Override
public String getLoadBalanceName() {
// TODO Auto-generated method stub
return "*";
}
@Override
public ClientConnectionResult getClientConnection(String serverKey, String topic, String content) {
ClientConnectionResult result1 = new ClientConnectionResult();
GwClient gwClient = this.loadBalanceManager.getOrCreateClient(serverKey);
result1.gwClient = gwClient;
result1.clientConnection = gwClient.getClientConnection();
return result1;
}
}