Package com.alibaba.wasp

Examples of com.alibaba.wasp.UnknownProtocolException


        RPCProtos.RpcRequestBody rpcRequest, long receiveTime) throws IOException {
      try {
        String methodName = rpcRequest.getMethodName();
        Method method = getMethod(protocol, methodName);
        if (method == null) {
          throw new UnknownProtocolException("Method " + methodName
              + " doesn't exist in protocol " + protocol.getName());
        }

        long clientVersion = rpcRequest.getClientProtocolVersion();

        // get an instance of the method arg type
        Message protoType = getMethodArgType(method);
        Message param = protoType.newBuilderForType()
            .mergeFrom(rpcRequest.getRequest()).build();
        Message result;
        Object impl = null;
        if (protocol.isAssignableFrom(this.implementation)) {
          impl = this.instance;
        } else {
          throw new UnknownProtocolException(protocol, "the server class is "
              + this.implementation.getName());
        }

        long startTime = System.currentTimeMillis();
        if (method.getParameterTypes().length == 2) {
View Full Code Here

TOP

Related Classes of com.alibaba.wasp.UnknownProtocolException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.