Examples of EchoServiceImpl


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

  @SuppressWarnings("deprecation")
  private static TransportDispatcher createDispatcher()
  {
    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.EchoServiceImpl

{
  @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.EchoServiceImpl

  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.EchoServiceImpl

    server.start();
  }

  private static TransportDispatcher createDispatcher(URI uri)
  {
  return new TransportDispatcherBuilder().addRestHandler(uri, new RestEchoServer(new EchoServiceImpl())).build();
  }
View Full Code Here

Examples of org.exolab.jms.net.EchoServiceImpl

        BasicPrincipal principal = new BasicPrincipal("user", "password");
        Authenticator authenticator = new TestAuthenticator(principal);
        ORB orb = createORB(authenticator);

        // set up the echo service
        EchoService service = new EchoServiceImpl();
        _service = orb.exportObject(service);
        assertTrue(_service instanceof EchoService);
        orb.getRegistry().bind(ECHO_SERVICE, _service);

        // make sure a valid user can perform a lookup
View Full Code Here

Examples of org.exolab.jms.net.EchoServiceImpl

     */
    protected void setUp() throws Exception {
        super.setUp();
        // export the service
        ORB orb = getORB();
        EchoService service = new EchoServiceImpl();
        _service = orb.exportObject(service);
        assertTrue(_service instanceof EchoService);

        // make sure registry is available
        orb.getRegistry();
View Full Code Here

Examples of org.exolab.jms.net.EchoServiceImpl

        }

        if (_embeddedService) {
            Registry serverRegistry = _orb.getRegistry();

            Proxy proxy = _orb.exportObject(new EchoServiceImpl());
            serverRegistry.bind(ECHO_SERVICE, proxy);
        } else {
            Properties props = new Properties();
            final String key = "log4j.configuration";
            String log4j = System.getProperty(key);
View Full Code Here

Examples of org.exolab.jms.net.EchoServiceImpl

     *
     * @throws Exception for any error
     */
    public void testExportObjectToNoCaller() throws Exception {
        ORB orb = getORB();
        EchoServiceImpl impl = new EchoServiceImpl();
        try {
            orb.exportObjectTo(impl);
            fail("Expected exportObjectTo() to fail with ExportException");
        } catch (ExportException expected) {
            // expected behaviour
View Full Code Here

Examples of org.exolab.jms.net.EchoServiceImpl

     */
    private void checkExportObject(BasicPrincipal principal)
            throws Exception {
        Authenticator authenticator = new TestAuthenticator(principal);
        ORB orb = createORB(authenticator);
        EchoServiceImpl impl = new EchoServiceImpl();
        Proxy proxy = orb.exportObject(impl);
        orb.getRegistry().bind("service", proxy);

        Registry registry = getRegistry(principal);
        EchoService service = (EchoService) registry.lookup("service");
View Full Code Here

Examples of org.exolab.jms.net.EchoServiceImpl

     */
    private void checkExportObjectURI(BasicPrincipal principal)
            throws Exception {
        Authenticator authenticator = new TestAuthenticator(principal);
        ORB orb = createORB(authenticator);
        EchoServiceImpl impl = new EchoServiceImpl();
        Proxy proxy = orb.exportObject(impl, getExportURI());
        orb.getRegistry().bind("service", proxy);

        Registry registry = getRegistry(principal);
        EchoService service = (EchoService) registry.lookup("service");
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.