Examples of RestEchoServer


Examples of com.linkedin.r2.sample.echo.rest.RestEchoServer

  {
    return new TransportDispatcherBuilder()
            .addRpcHandler(ECHO_URI, new RpcEchoServer(new EchoServiceImpl()))
            .addRpcHandler(ON_EXCEPTION_ECHO_URI, new RpcEchoServer(new OnExceptionEchoService()))
            .addRpcHandler(THROWING_ECHO_URI, new RpcEchoServer(new ThrowingEchoService()))
            .addRestHandler(ECHO_URI, new RestEchoServer(new EchoServiceImpl()))
            .addRestHandler(ON_EXCEPTION_ECHO_URI, new RestEchoServer(new OnExceptionEchoService()))
            .addRestHandler(THROWING_ECHO_URI, new RestEchoServer(new ThrowingEchoService()))
            .build();
  }
View Full Code Here

Examples of com.linkedin.r2.sample.echo.rest.RestEchoServer

  @SuppressWarnings("deprecation")
  public Server create(int port, URI echoUri)
  {
    final TransportDispatcher dispatcher = new TransportDispatcherBuilder()
          .addRpcHandler(echoUri, new RpcEchoServer(new EchoServiceImpl()))
          .addRestHandler(echoUri, new RestEchoServer(new EchoServiceImpl()))
          .build();

    return createServer(port, dispatcher);
  }
View Full Code Here

Examples of com.linkedin.r2.sample.echo.rest.RestEchoServer

  public static void main(String[] args) throws IOException
  {
    final int port = Integer.parseInt(System.getProperty(SERVER_PORT_PROP_NAME, DEFAULT_PORT));
    final URI relativeUri = MiscUtil.getUri(DEFAULT_RELATIVE_URI);
    final TransportDispatcher dispatcher = new TransportDispatcherBuilder()
    .addRestHandler(relativeUri, new RestEchoServer(new EchoServiceImpl()))
    .build();

    final Server server = new HttpServerFactory().createServer(port, dispatcher);
    //final Server server = new HttpServerFactory().createServer(port, createDispatcher(relativeUri));
    server.start();
View Full Code Here

Examples of com.linkedin.r2.sample.echo.rest.RestEchoServer

    server.start();
  }

  private static TransportDispatcher createDispatcher(URI uri)
  {
  return new TransportDispatcherBuilder().addRestHandler(uri, new RestEchoServer(new EchoServiceImpl())).build();
  }
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.