All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ikasoa.rpc.Configurator Maven / Gradle / Ivy

There is a newer version: 0.3.3-BETA3
Show newest version
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;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy