Examples of EchoService


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

  }

  @Test
  public void testOnExceptionEchoService() throws Exception
  {
    final EchoService client = getEchoClient(_client, Bootstrap.getOnExceptionEchoURI());

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

    try
    {
      callback.get();
      Assert.fail("Should have thrown an exception");
View Full Code Here

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

  }

  @Test
  public void testFilterChain() throws Exception
  {
    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);
    callback.get();

    // Make sure the server got its wire attribute
    Assert.assertEquals(_serverCaptureFilter.getRequest().get(_toServerKey), _toServerValue);
View Full Code Here

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

  }

  @Test
  public void testFilterChainOnException() throws Exception
  {
    final EchoService client = getEchoClient(_client, URI.create("/unknown-service"));

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

    client.echo(msg, callback);
    try
    {
      callback.get();
      Assert.fail("Should have thrown an exception");
    }
View Full Code Here

Examples of echo.server.EchoService

        RuntimeWire wire = componentService.getRuntimeWire(binding);
        InvocationChain chain = wire.getInvocationChains().get(0);
       
        // Register with the hosting server
        String uri = component.getURI() + "/" + binding.getName();
        EchoServer.getServer().register(uri, new EchoService(chain.getHeadInvoker(), messageFactory));
    }
View Full Code Here

Examples of org.apache.commons.httpclient.EchoService

        UsernamePasswordCredentials creds =
            new UsernamePasswordCredentials("testuser", "testpass");
       
        HttpRequestHandlerChain handlerchain = new HttpRequestHandlerChain();
        handlerchain.appendHandler(new AuthRequestHandler(creds));
        handlerchain.appendHandler(new HttpServiceHandler(new EchoService()));

        HttpState state = new HttpState();
        AuthScope authscope = new AuthScope(
            this.server.getLocalAddress(),
            this.server.getLocalPort(),
View Full Code Here

Examples of org.apache.commons.httpclient.EchoService

        UsernamePasswordCredentials creds =
            new UsernamePasswordCredentials("testuser", "testpass");
       
        HttpRequestHandlerChain handlerchain = new HttpRequestHandlerChain();
        handlerchain.appendHandler(new AuthRequestHandler(creds));
        handlerchain.appendHandler(new HttpServiceHandler(new EchoService()));

        HttpState state = new HttpState();
        AuthScope authscope = new AuthScope(
            this.server.getLocalAddress(),
            this.server.getLocalPort(),
View Full Code Here

Examples of org.apache.commons.httpclient.EchoService

        UsernamePasswordCredentials creds =
            new UsernamePasswordCredentials("testuser", "testpass");
       
        HttpRequestHandlerChain handlerchain = new HttpRequestHandlerChain();
        handlerchain.appendHandler(new AuthRequestHandler(creds));
        handlerchain.appendHandler(new HttpServiceHandler(new EchoService()));

        HttpState state = new HttpState();
        AuthScope authscope = new AuthScope(
            this.server.getLocalAddress(),
            this.server.getLocalPort(),
View Full Code Here

Examples of org.apache.commons.httpclient.EchoService

        UsernamePasswordCredentials creds =
            new UsernamePasswordCredentials("testuser", "testpass");
       
        HttpRequestHandlerChain handlerchain = new HttpRequestHandlerChain();
        handlerchain.appendHandler(new AuthRequestHandler(creds));
        handlerchain.appendHandler(new HttpServiceHandler(new EchoService()));

        HttpState state = new HttpState();
        AuthScope authscope = new AuthScope(
            this.server.getLocalAddress(),
            this.server.getLocalPort(),
View Full Code Here

Examples of org.apache.commons.httpclient.EchoService

        UsernamePasswordCredentials creds =
            new UsernamePasswordCredentials("testuser", "testpass");
       
        HttpRequestHandlerChain handlerchain = new HttpRequestHandlerChain();
        handlerchain.appendHandler(new AuthRequestHandler(creds));
        handlerchain.appendHandler(new HttpServiceHandler(new EchoService()));

        HttpState state = new HttpState();
        AuthScope authscope = new AuthScope(
            this.server.getLocalAddress(),
            this.server.getLocalPort(),
View Full Code Here

Examples of org.apache.commons.httpclient.EchoService

        UsernamePasswordCredentials creds =
            new UsernamePasswordCredentials("testuser", "testpass");
       
        HttpRequestHandlerChain handlerchain = new HttpRequestHandlerChain();
        handlerchain.appendHandler(new AuthRequestHandler(creds));
        handlerchain.appendHandler(new HttpServiceHandler(new EchoService()));

        HttpState state = new HttpState();
        AuthScope authscope = new AuthScope(
            this.server.getLocalAddress(),
            this.server.getLocalPort(),
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.