Examples of echo()


Examples of com.alibaba.dubbo.rpc.protocol.dubbo.support.DemoService.echo()

  {
    DemoService service = new DemoServiceImpl();
    URL url = URL.valueOf("dubbo://127.0.0.1:9010/com.alibaba.dubbo.rpc.DemoService?service.filter=echo");
    protocol.export(proxy.getInvoker(service, DemoService.class, url));
    service = proxy.getProxy(protocol.refer(DemoService.class, url));
    assertEquals("123",service.echo("123"));
    // cast to EchoService
    EchoService echo = proxy.getProxy(protocol.refer(EchoService.class, url));
    assertEquals(echo.$echo("test"), "test");
    assertEquals(echo.$echo("abcdefg"), "abcdefg");
    assertEquals(echo.$echo(1234), 1234);
View Full Code Here

Examples of com.alibaba.dubbo.rpc.protocol.dubbo.support.DemoServiceImpl.echo()

  {
    DemoService service = new DemoServiceImpl();
    URL url = URL.valueOf("dubbo://127.0.0.1:9010/com.alibaba.dubbo.rpc.DemoService?service.filter=echo");
    protocol.export(proxy.getInvoker(service, DemoService.class, url));
    service = proxy.getProxy(protocol.refer(DemoService.class, url));
    assertEquals("123",service.echo("123"));
    // cast to EchoService
    EchoService echo = proxy.getProxy(protocol.refer(EchoService.class, url));
    assertEquals(echo.$echo("test"), "test");
    assertEquals(echo.$echo("abcdefg"), "abcdefg");
    assertEquals(echo.$echo(1234), 1234);
View Full Code Here

Examples of com.alibaba.dubbo.rpc.service.EchoService.$echo()

      DemoService service = new DemoServiceImpl();
      Exporter<?> rpcExporter = protocol.export(proxy.getInvoker(service, DemoService.class, URL.valueOf("rmi://127.0.0.1:9002/TestService")));
       
      // cast to EchoService
        EchoService echo = proxy.getProxy(protocol.refer(EchoService.class, URL.valueOf("rmi://127.0.0.1:9002/TestService")));
        assertEquals(echo.$echo("test"), "test");
        assertEquals(echo.$echo("abcdefg"), "abcdefg");
        assertEquals(echo.$echo(1234), 1234);
       
        rpcExporter.unexport();
       
View Full Code Here

Examples of com.apress.prospring.ch13.ejb.EchoService.echo()

    }

    private void doStatelessExample(ApplicationContext ctx, PrintWriter writer) {
        // access the EJB proxy
        EchoService service = (EchoService) ctx.getBean("echoService");
        writer.write(service.echo("Foo"));
    }

    private void doStatefulExample(ApplicationContext ctx, PrintWriter writer,
            HttpSession session) {
        CounterService service = (CounterService) session
View Full Code Here

Examples of com.google.web.bindery.requestfactory.shared.SimpleFooRequest.echo()

        new SimpleFooEventHandler<SimpleFooProxy>();
    EntityProxyChange.registerForProxyType(req.getEventBus(), SimpleFooProxy.class, handler);
    SimpleFooRequest context = req.simpleFooRequest();
    final SimpleFooProxy simpleFoo = context.create(SimpleFooProxy.class);
    simpleFoo.setUnpersisted(true);
    context.echo(simpleFoo).fire(new Receiver<SimpleFooProxy>() {
      @Override
      public void onSuccess(SimpleFooProxy response) {
        response = checkSerialization(response);
        assertEquals(0, handler.totalEventCount);
        checkStableIdEquals(simpleFoo, response);
View Full Code Here

Examples of com.linkedin.r2.sample.echo.EchoService.echo()

  {
    final EchoService client = getEchoClient(_client, Bootstrap.getEchoURI());

    final String msg = "This is a simple echo message";
    final FutureCallback<String> callback = new FutureCallback<String>();
    client.echo(msg, callback);

    Assert.assertEquals(callback.get(), msg);
  }

  @Test
View Full Code Here

Examples of com.oldratlee.cooma.ext1.Ext1.echo()

        Ext1 ext = ExtensionLoader.getExtensionLoader(Ext1.class).getAdaptiveExtension();

        Map<String, String> map = new HashMap<String, String>();
        Config config = Config.fromKv("protocol", "p1", "host", "1.2.3.4", "port", "1010", "path", "path1");

        String echo = ext.echo(config, "haha");
        assertEquals("Ext1Impl1-echo", echo);
    }

    @Test
    public void test_getAdaptiveExtension() throws Exception {
View Full Code Here

Examples of com.oldratlee.cooma.ext2.Ext2.echo()

        Config config = Config.fromKv("protocol", "p1", "host", "1.2.3.4", "port", "1010", "path", "path1", "ext2", "impl1");
       
        UrlHolder holder = new UrlHolder();
        holder.setUrl(config);
   
        String echo = ext.echo(holder, "haha");
        assertEquals("Ext2Impl1-echo", echo);
    }

    @Test
    public void test_urlHolder_getAdaptiveExtension_noExtension() throws Exception {
View Full Code Here

Examples of com.oldratlee.cooma.ext3.Ext3.echo()

    public void test_getAdaptiveExtension_protocolKey() throws Exception {
        Ext3 ext = ExtensionLoader.getExtensionLoader(Ext3.class).getAdaptiveExtension();
   
        Config config = Config.fromKv("protocol", "impl3", "host", "1.2.3.4", "port", "1010", "path", "path1");

        String echo = ext.echo(config, "s");
        assertEquals("Ext3Impl3-echo", echo);
   
        config = config.addConfig("key1", "impl2");
        echo = ext.echo(config, "s");
        assertEquals("Ext3Impl2-echo", echo);
View Full Code Here

Examples of com.oldratlee.cooma.ext6_inject.Ext6.echo()

    public void test_getAdaptiveExtension_inject() throws Exception {
        Ext6 ext = ExtensionLoader.getExtensionLoader(Ext6.class).getAdaptiveExtension();

        Config config = Config.fromKv("protocol", "p1", "host", "1.2.3.4", "port", "1010", "path", "path1", "ext6", "impl1");
       
        assertEquals("Ext6Impl1-echo-Ext1Impl1-echo", ext.echo(config, "ha"));
       
        config = config.addConfig("ext1", "impl2");
        assertEquals("Ext6Impl1-echo-Ext1Impl2-echo", ext.echo(config, "ha"));
       
    }
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.