// 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/rpc/CallResultFuture.java
// public class CallResultFuture {
// 	private Object result;
// 	private JSONObject detail;
// 	Object lock = new Object();
// 
// 	private Class<?> returnType;
// 
// 	public CallResultFuture(Class<?> returnType) {
// 		this.returnType = returnType;
// 	}
// 
// 	public void waitReturn(long timeoutInMs) {
// 		synchronized (lock) {
// 			try {
// 				lock.wait(timeoutInMs);
// 			} catch (InterruptedException e) {
// 				e.printStackTrace();
// 				throw new RuntimeException(e);
// 			}
// 		}
// 
// 		if (result == null && returnType != null) {
// 			throw new TimeoutException("{timeoutInMs:" + timeoutInMs + "}");
// 		}
// 		if (result instanceof Throwable) {
// 			Throwable e = (Throwable) result;
// 			throw new RuntimeException(e);
// 		}
// 	}
// 
// 	public void putResultAndReturn(Object result) {
// 		this.result = result;
// 		synchronized (lock) {
// 			lock.notifyAll();
// 		}
// 	}
// 	
// 	public void returnWithVoid(){
// 		synchronized (lock) {
// 			lock.notifyAll();
// 		}
// 	}
// 	
// 	@Deprecated
// 	/**
// 	 * Deprecated: not in use
// 	 * @param detail
// 	 * @return
// 	 */
// 	public CallResultFuture putDetail(JSONObject detail){
// 		this.detail = detail;
// 		return this;
// 	}
// 
// 	public Object getResult(){
// 		return result;
// 	}
// 
// 	public JSONObject getDetail() {
// 		return detail;
// 	}
// 
// 	public void setDetail(JSONObject detail) {
// 		this.detail = detail;
// 	}
// 
// 	public Class<?> getReturnType() {
// 		return returnType;
// 	}
// 
// 	public void setReturnType(Class<?> returnType) {
// 		this.returnType = returnType;
// 	}
// 
// }


import github.mappingrpc.core.metadata.MetaHolder;
import github.mappingrpc.core.rpc.CallResultFuture;
import io.netty.channel.ChannelHandlerContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.alibaba.fastjson.JSONArray;
package github.mappingrpc.core.io.wamp.handler;




public class ResultCommandHandler {
	static Logger log = LoggerFactory.getLogger(ResultCommandHandler.class);

// 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/rpc/CallResultFuture.java
// public class CallResultFuture {
// 	private Object result;
// 	private JSONObject detail;
// 	Object lock = new Object();
// 
// 	private Class<?> returnType;
// 
// 	public CallResultFuture(Class<?> returnType) {
// 		this.returnType = returnType;
// 	}
// 
// 	public void waitReturn(long timeoutInMs) {
// 		synchronized (lock) {
// 			try {
// 				lock.wait(timeoutInMs);
// 			} catch (InterruptedException e) {
// 				e.printStackTrace();
// 				throw new RuntimeException(e);
// 			}
// 		}
// 
// 		if (result == null && returnType != null) {
// 			throw new TimeoutException("{timeoutInMs:" + timeoutInMs + "}");
// 		}
// 		if (result instanceof Throwable) {
// 			Throwable e = (Throwable) result;
// 			throw new RuntimeException(e);
// 		}
// 	}
// 
// 	public void putResultAndReturn(Object result) {
// 		this.result = result;
// 		synchronized (lock) {
// 			lock.notifyAll();
// 		}
// 	}
// 	
// 	public void returnWithVoid(){
// 		synchronized (lock) {
// 			lock.notifyAll();
// 		}
// 	}
// 	
// 	@Deprecated
// 	/**
// 	 * Deprecated: not in use
// 	 * @param detail
// 	 * @return
// 	 */
// 	public CallResultFuture putDetail(JSONObject detail){
// 		this.detail = detail;
// 		return this;
// 	}
// 
// 	public Object getResult(){
// 		return result;
// 	}
// 
// 	public JSONObject getDetail() {
// 		return detail;
// 	}
// 
// 	public void setDetail(JSONObject detail) {
// 		this.detail = detail;
// 	}
// 
// 	public Class<?> getReturnType() {
// 		return returnType;
// 	}
// 
// 	public void setReturnType(Class<?> returnType) {
// 		this.returnType = returnType;
// 	}
// 
// }


// Path: mappingrpc-connector/src/main/java/github/mappingrpc/core/io/wamp/handler/ResultCommandHandler.java
import github.mappingrpc.core.metadata.MetaHolder;
import github.mappingrpc.core.rpc.CallResultFuture;
import io.netty.channel.ChannelHandlerContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.alibaba.fastjson.JSONArray;

package github.mappingrpc.core.io.wamp.handler;




public class ResultCommandHandler {
	static Logger log = LoggerFactory.getLogger(ResultCommandHandler.class);

	public static void processCommand(MetaHolder metaHolder, ChannelHandlerContext channelCtx, JSONArray jsonArray) {