Package com.alibaba.dubbo.rpc.support

Examples of com.alibaba.dubbo.rpc.support.MockProtocol.refer()


    Invoker<IHelloService> cluster = getClusterInvoker(url);       
        URL mockUrl = URL.valueOf("mock://localhost/"+IHelloService.class.getName()
        +"?getSomething.mock=return aa");
   
    Protocol protocol = new MockProtocol();
    Invoker<IHelloService> mInvoker1 = protocol.refer(IHelloService.class, mockUrl);
    invokers.add(mInvoker1);
       
    //方法配置了mock
        RpcInvocation invocation = new RpcInvocation();
    invocation.setMethodName("getSomething");
View Full Code Here


    Invoker<IHelloService> cluster = getClusterInvoker(url);       
        URL mockUrl = URL.valueOf("mock://localhost/"+IHelloService.class.getName()
        +"?getSomething.mock=return aa").addParameters(url.getParameters());
   
    Protocol protocol = new MockProtocol();
    Invoker<IHelloService> mInvoker1 = protocol.refer(IHelloService.class, mockUrl);
    invokers.add(mInvoker1);
       
    //方法配置了mock
        RpcInvocation invocation = new RpcInvocation();
    invocation.setMethodName("getSomething");
View Full Code Here

      URL mockUrl = URL.valueOf("mock://localhost/"+IHelloService.class.getName()
        +"?getSomething.mock=return aa&getSomething3xx.mock=return xx")
        .addParameters(url.getParameters());
   
    Protocol protocol = new MockProtocol();
    Invoker<IHelloService> mInvoker1 = protocol.refer(IHelloService.class, mockUrl);
    invokers.add(mInvoker1);
     
    //方法配置了mock
      RpcInvocation invocation = new RpcInvocation();
    invocation.setMethodName("getSomething");
View Full Code Here

      URL mockUrl = URL.valueOf("mock://localhost/"+IHelloService.class.getName()
        +"?getSomething.mock=return aa&getSomething3xx.mock=return xx&sayHello.mock=return ")
        .addParameters(url.getParameters());
   
    Protocol protocol = new MockProtocol();
    Invoker<IHelloService> mInvoker1 = protocol.refer(IHelloService.class, mockUrl);
    invokers.add(mInvoker1);
     
      RpcInvocation invocation = new RpcInvocation();
    invocation.setMethodName("sayHello");
      Result ret = cluster.invoke(invocation);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.