// Path: mappingrpc-connector/src/main/java/github/mappingrpc/core/io/wamp/handler/WampCommandBaseHandler.java
// public class WampCommandBaseHandler implements Runnable {
// 
// 	static Logger log = LoggerFactory.getLogger(WampCommandBaseHandler.class);
// 
// 	private MetaHolder metaHolder;
// 	private JSONArray jsonArray;
// 	private ChannelHandlerContext channelCtx;
// 
// 	public WampCommandBaseHandler(MetaHolder metaHolder, ChannelHandlerContext channelCtx, JSONArray jsonArray) {
// 		this.metaHolder = metaHolder;
// 		this.channelCtx = channelCtx;
// 		this.jsonArray = jsonArray;
// 	}
// 
// 	@Override
// 	public void run() {
// 		int commandType = jsonArray.getIntValue(0);
// 		try {
// 			runInCatch(commandType);
// 		} catch (Throwable ex) {
// 			log.error("{commandType:" + commandType + "}", ex);
// 		}
// 	}
// 
// 	private void runInCatch(int commandType) {
// 		switch (commandType) {
// 		case MsgTypeConstant.call:
// 			CallCommandHandler.processCommand(metaHolder, channelCtx, jsonArray);
// 			break;
// 		case MsgTypeConstant.result:
// 			ResultCommandHandler.processCommand(metaHolder, channelCtx, jsonArray);
// 			break;
// 		case MsgTypeConstant.error:
// 			ExceptionErrorCommandHandler.processCommand(metaHolder, channelCtx, jsonArray);
// 			break;
// 		case MsgTypeConstant.hello:
// 			HelloCommandHandler.processCommand(metaHolder, channelCtx, jsonArray);
// 			break;
// 		case MsgTypeConstant.wellcome:
// 			WellcomeCommandHandler.processCommand(metaHolder, channelCtx, jsonArray);
// 			break;
// 		}
// 	}
// 
// }
// 
// Path: mappingrpc-connector/src/main/java/github/mappingrpc/core/metadata/MetaHolder.java
// public class MetaHolder {
// 	private Map<String, ProviderMeta> providerHolder = new HashMap<>();
// 	private Map<String, ServiceInvocationHandler> clientProxyHolder = new HashMap<>();
// 	private Map<Long, CallResultFuture> requestPool = new ConcurrentHashMap<>();
// 	private long feature1;
// 	private ExecutorService threadPool;
// 	private ExecutorService sysThreadPool;// for QOS
// 
// 	public Map<String, ProviderMeta> getProviderHolder() {
// 		return providerHolder;
// 	}
// 
// 	public Map<String, ServiceInvocationHandler> getClientProxyHolder() {
// 		return clientProxyHolder;
// 	}
// 
// 	public Map<Long, CallResultFuture> getRequestPool() {
// 		return requestPool;
// 	}
// 
// 	public void setRequestPool(Map<Long, CallResultFuture> requestPool) {
// 		this.requestPool = requestPool;
// 	}
// 
// 	public ExecutorService getThreadPool() {
// 		return threadPool;
// 	}
// 
// 	public void setThreadPool(ExecutorService threadPool) {
// 		this.threadPool = threadPool;
// 	}
// 
// 	public long getFeature1() {
// 		return feature1;
// 	}
// 
// 	public void setFeature1(long feature1) {
// 		this.feature1 = feature1;
// 	}
// }


import github.mappingrpc.core.io.wamp.handler.WampCommandBaseHandler;
import github.mappingrpc.core.metadata.MetaHolder;
import io.netty.channel.ChannelHandler.Sharable;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import com.alibaba.fastjson.JSONArray;
package github.mappingrpc.core.io.custompackage;



@Sharable
public class WampJsonArrayHandler extends ChannelInboundHandlerAdapter {
	private MetaHolder metaHolder;

	public WampJsonArrayHandler(MetaHolder metaHolder) {
		this.metaHolder = metaHolder;
	}

	@Override
	public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
		if (!(msg instanceof JSONArray)) {
			super.channelRead(ctx, msg);
		}
		JSONArray jsonArray = (JSONArray) msg;
// Path: mappingrpc-connector/src/main/java/github/mappingrpc/core/io/wamp/handler/WampCommandBaseHandler.java
// public class WampCommandBaseHandler implements Runnable {
// 
// 	static Logger log = LoggerFactory.getLogger(WampCommandBaseHandler.class);
// 
// 	private MetaHolder metaHolder;
// 	private JSONArray jsonArray;
// 	private ChannelHandlerContext channelCtx;
// 
// 	public WampCommandBaseHandler(MetaHolder metaHolder, ChannelHandlerContext channelCtx, JSONArray jsonArray) {
// 		this.metaHolder = metaHolder;
// 		this.channelCtx = channelCtx;
// 		this.jsonArray = jsonArray;
// 	}
// 
// 	@Override
// 	public void run() {
// 		int commandType = jsonArray.getIntValue(0);
// 		try {
// 			runInCatch(commandType);
// 		} catch (Throwable ex) {
// 			log.error("{commandType:" + commandType + "}", ex);
// 		}
// 	}
// 
// 	private void runInCatch(int commandType) {
// 		switch (commandType) {
// 		case MsgTypeConstant.call:
// 			CallCommandHandler.processCommand(metaHolder, channelCtx, jsonArray);
// 			break;
// 		case MsgTypeConstant.result:
// 			ResultCommandHandler.processCommand(metaHolder, channelCtx, jsonArray);
// 			break;
// 		case MsgTypeConstant.error:
// 			ExceptionErrorCommandHandler.processCommand(metaHolder, channelCtx, jsonArray);
// 			break;
// 		case MsgTypeConstant.hello:
// 			HelloCommandHandler.processCommand(metaHolder, channelCtx, jsonArray);
// 			break;
// 		case MsgTypeConstant.wellcome:
// 			WellcomeCommandHandler.processCommand(metaHolder, channelCtx, jsonArray);
// 			break;
// 		}
// 	}
// 
// }
// 
// Path: mappingrpc-connector/src/main/java/github/mappingrpc/core/metadata/MetaHolder.java
// public class MetaHolder {
// 	private Map<String, ProviderMeta> providerHolder = new HashMap<>();
// 	private Map<String, ServiceInvocationHandler> clientProxyHolder = new HashMap<>();
// 	private Map<Long, CallResultFuture> requestPool = new ConcurrentHashMap<>();
// 	private long feature1;
// 	private ExecutorService threadPool;
// 	private ExecutorService sysThreadPool;// for QOS
// 
// 	public Map<String, ProviderMeta> getProviderHolder() {
// 		return providerHolder;
// 	}
// 
// 	public Map<String, ServiceInvocationHandler> getClientProxyHolder() {
// 		return clientProxyHolder;
// 	}
// 
// 	public Map<Long, CallResultFuture> getRequestPool() {
// 		return requestPool;
// 	}
// 
// 	public void setRequestPool(Map<Long, CallResultFuture> requestPool) {
// 		this.requestPool = requestPool;
// 	}
// 
// 	public ExecutorService getThreadPool() {
// 		return threadPool;
// 	}
// 
// 	public void setThreadPool(ExecutorService threadPool) {
// 		this.threadPool = threadPool;
// 	}
// 
// 	public long getFeature1() {
// 		return feature1;
// 	}
// 
// 	public void setFeature1(long feature1) {
// 		this.feature1 = feature1;
// 	}
// }


// Path: mappingrpc-connector/src/main/java/github/mappingrpc/core/io/custompackage/WampJsonArrayHandler.java
import github.mappingrpc.core.io.wamp.handler.WampCommandBaseHandler;
import github.mappingrpc.core.metadata.MetaHolder;
import io.netty.channel.ChannelHandler.Sharable;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import com.alibaba.fastjson.JSONArray;

package github.mappingrpc.core.io.custompackage;



@Sharable
public class WampJsonArrayHandler extends ChannelInboundHandlerAdapter {
	private MetaHolder metaHolder;

	public WampJsonArrayHandler(MetaHolder metaHolder) {
		this.metaHolder = metaHolder;
	}

	@Override
	public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
		if (!(msg instanceof JSONArray)) {
			super.channelRead(ctx, msg);
		}
		JSONArray jsonArray = (JSONArray) msg;
		WampCommandBaseHandler commandHandler = new WampCommandBaseHandler(metaHolder, ctx, jsonArray);