com.ikasoa.rpc.Configurator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ikasoa-rpc Show documentation
Show all versions of ikasoa-rpc Show documentation
ikasoa-rpc is a high performance RPC(Remote Procedure Call) framework.
package com.ikasoa.rpc;
import com.ikasoa.core.thrift.client.ThriftClientConfiguration;
import com.ikasoa.core.thrift.server.ThriftServerConfiguration;
import com.ikasoa.rpc.handler.ClientInvocationHandler;
import com.ikasoa.rpc.handler.ProtocolHandler;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 配置信息
*
* @author Larry
* @version 0.1
*/
@Data
@NoArgsConstructor
public class Configurator {
/**
* 服务器配置信息
*/
private ThriftServerConfiguration thriftServerConfiguration;
/**
* 客户端配置信息
*/
private ThriftClientConfiguration thriftClientConfiguration;
/**
* 客户端配置服务调用信息
*/
private ServerInfoWrapper serverInfoWrapper;
/**
* 转换协议实现类
*/
@SuppressWarnings("rawtypes")
private Class protocolHandlerClass;
/**
* 客户端调用拦截器
*/
private ClientInvocationHandler clientInvocationHandler;
/**
* 是否使用阻塞式IO
*/
private boolean isNonBlockingIO = Boolean.FALSE;
public Configurator(ServerInfoWrapper serverInfoWrapper) {
this.serverInfoWrapper = serverInfoWrapper;
}
@SuppressWarnings("rawtypes")
public Configurator(Class protocolHandlerClass) {
this.protocolHandlerClass = protocolHandlerClass;
}
@SuppressWarnings("rawtypes")
public Configurator(ServerInfoWrapper serverInfoWrapper, Class protocolHandlerClass) {
this.serverInfoWrapper = serverInfoWrapper;
this.protocolHandlerClass = protocolHandlerClass;
}
}