Package com.alibaba.dubbo.rpc.support

Examples of com.alibaba.dubbo.rpc.support.MockProtocol


    url = url.addParameter(Constants.MOCK_KEY, "fail" );
    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


        .addParameter("invoke_return_error", "true" );
    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

    Invoker<IHelloService> cluster = getClusterInvoker(url);       
      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

    Invoker<IHelloService> cluster = getClusterInvoker(url);       
      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

Related Classes of com.alibaba.dubbo.rpc.support.MockProtocol

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.