Package org.apache.avro.ipc.specific

Examples of org.apache.avro.ipc.specific.SpecificRequestor


    responder = new SpecificResponder(Simple.class, new TestImpl());
    server = createServer(responder);
    server.start();
   
    client = createTransceiver();
    SpecificRequestor req = new SpecificRequestor(Simple.class, client);
    addRpcPlugins(req);
    proxy = SpecificRequestor.getClient(Simple.class, (SpecificRequestor)req);
   
    monitor = new HandshakeMonitor();
    responder.addRPCPlugin(monitor);
View Full Code Here


    responder = new SpecificResponder(Simple.class, new TestImpl());
    server = createServer(responder);
    server.start();
   
    client = createTransceiver();
    SpecificRequestor req = new SpecificRequestor(Simple.class, client);
    addRpcPlugins(req);
    proxy = SpecificRequestor.getClient(Simple.class, (SpecificRequestor)req);
   
    monitor = new HandshakeMonitor();
    responder.addRPCPlugin(monitor);
View Full Code Here

    SpecificResponder responder
      = new SpecificResponder(Simple.class, new TestImpl(),
                              new SpecificData(loader));
    assertEquals(responder.getSpecificData().getClassLoader(), loader);

    SpecificRequestor requestor
      = new SpecificRequestor(Simple.class, client, new SpecificData(loader));
    assertEquals(requestor.getSpecificData().getClassLoader(), loader);
  }
View Full Code Here

  }
 
  @Test(expected = Exception.class)
  public void testConnectionRefusedOneWay() throws IOException {
    Transceiver client = new HttpTransceiver(new URL("http://localhost:4444"));
    SpecificRequestor req = new SpecificRequestor(Simple.class, client);
    addRpcPlugins(req);
    Simple proxy = SpecificRequestor.getClient(Simple.class, (SpecificRequestor)req);
    proxy.ack();
  }
View Full Code Here

  @Test
  public void testRpcPluginOrdering() throws Exception {
    OrderPlugin plugin = new OrderPlugin();
   
    SpecificResponder responder = new SpecificResponder(Mail.class, new TestMailImpl());
    SpecificRequestor requestor = new SpecificRequestor(Mail.class, new LocalTransceiver(responder));
    responder.addRPCPlugin(plugin);
    requestor.addRPCPlugin(plugin);
   
    Mail client = SpecificRequestor.getClient(Mail.class, requestor);
    Message message = createTestMessage();
    client.send(message);
  }
View Full Code Here

    static int avroPort = setupFreePort("avroport");

    @Override
    protected void initializeTranceiver() throws IOException {
        transceiver = new NettyTransceiver(new InetSocketAddress("localhost", avroPort));
        requestor = new SpecificRequestor(KeyValueProtocol.class, transceiver);
    }
View Full Code Here

    static int avroPort = setupFreePort("avroport");

    @Override
    protected void initializeTranceiver() throws IOException {
        transceiver = new HttpTransceiver(new URL("http://localhost:" + avroPort));
        requestor = new SpecificRequestor(KeyValueProtocol.class, transceiver);
    }
View Full Code Here

    responder = new SpecificResponder(Simple.class, new TestImpl());
    server = createServer(responder);
    server.start();
   
    client = createTransceiver();
    SpecificRequestor req = new SpecificRequestor(Simple.class, client);
    addRpcPlugins(req);
    proxy = SpecificRequestor.getClient(Simple.class, (SpecificRequestor)req);
   
    monitor = new HandshakeMonitor();
    responder.addRPCPlugin(monitor);
View Full Code Here

  }
 
  @Test(expected = Exception.class)
  public void testConnectionRefusedOneWay() throws IOException {
    Transceiver client = new HttpTransceiver(new URL("http://localhost:4444"));
    SpecificRequestor req = new SpecificRequestor(Simple.class, client);
    addRpcPlugins(req);
    Simple proxy = SpecificRequestor.getClient(Simple.class, (SpecificRequestor)req);
    proxy.ack();
  }
View Full Code Here

  @Test
  public void testRpcPluginOrdering() throws Exception {
    OrderPlugin plugin = new OrderPlugin();
   
    SpecificResponder responder = new SpecificResponder(Mail.class, new TestMailImpl());
    SpecificRequestor requestor = new SpecificRequestor(Mail.class, new LocalTransceiver(responder));
    responder.addRPCPlugin(plugin);
    requestor.addRPCPlugin(plugin);
   
    Mail client = SpecificRequestor.getClient(Mail.class, requestor);
    Message message = createTestMessage();
    client.send(message);
  }
View Full Code Here

TOP

Related Classes of org.apache.avro.ipc.specific.SpecificRequestor

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.