Package org.apache.avro.ipc.specific

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


  protected static TestNamespace proxy;

  @Before
  public void testStartServer() throws Exception {
    if (server != null) return;
    server = new SocketServer(new SpecificResponder(TestNamespace.class, new TestImpl()),
                              new InetSocketAddress(0));
    server.start();
    client = new SocketTransceiver(new InetSocketAddress(server.getPort()));
    proxy = SpecificRequestor.getClient(TestNamespace.class, client);
  }
View Full Code Here


import org.apache.avro.test.Simple;

public class TestProtocolDatagram extends TestProtocolSpecific {
  @Override
  public Server createServer(Responder testResponder) throws Exception {
    return  new DatagramServer(new SpecificResponder(Simple.class, new TestImpl()),
        new InetSocketAddress("localhost",
            new Random().nextInt(10000)+10000));
  }
View Full Code Here

  private static Simple simpleService = new SimpleImpl(ackFlag);
 
  @BeforeClass
  public static void initializeConnections() throws Exception {
    // start server
    Responder responder = new SpecificResponder(Simple.class, simpleService);
    server = new NettyServer(responder, new InetSocketAddress(0));
    server.start();
 
    int serverPort = server.getPort();
    System.out.println("server port : " + serverPort);
View Full Code Here

 
  @Test
  public void testSendAfterChannelClose() throws Exception {
    // Start up a second server so that closing the server doesn't
    // interfere with the other unit tests:
    Server server2 = new NettyServer(new SpecificResponder(Simple.class, simpleService),
        new InetSocketAddress(0));
    server2.start();
    try {
      int serverPort = server2.getPort();
      System.out.println("server2 port : " + serverPort);
View Full Code Here

  @Test
  public void cancelPendingRequestsOnTransceiverClose() throws Exception {
    // Start up a second server so that closing the server doesn't
    // interfere with the other unit tests:
    BlockingSimpleImpl blockingSimpleImpl = new BlockingSimpleImpl();
    Server server2 = new NettyServer(new SpecificResponder(Simple.class,
        blockingSimpleImpl), new InetSocketAddress(0));
    server2.start();
    try {
      int serverPort = server2.getPort();
      System.out.println("server2 port : " + serverPort);
View Full Code Here

  @BeforeClass
  public static void initializeConnections()throws Exception {
    // start server
    System.out.println("starting server...");
    mailService = new MailImpl();
    Responder responder = new SpecificResponder(Mail.class, mailService);
    server = new NettyServer(responder, new InetSocketAddress(0));
    server.start();
 
    int serverPort = server.getPort();
    System.out.println("server port : " + serverPort);
View Full Code Here

                          Reporter reporter) throws Exception {
    try {
      // start server
      this.outputService = new TetherOutputService(collector, reporter);
      this.outputServer = new SocketServer
        (new SpecificResponder(OutputProtocol.class, outputService),
         new InetSocketAddress(0));
      outputServer.start();
     
      // start sub-process, connecting back to server
      this.subprocess = startSubprocess(job);
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

    }
   
    this.storage.setMaxSpans(maxSpans);
   
    // Start serving span data
    responder = new SpecificResponder(
        AvroTrace.PROTOCOL, new TraceResponder(this.storage));
   
    boolean bound = false;
   
    while (!bound) {
View Full Code Here

  public TetherTaskRunner(TetherTask task) throws IOException {
    this.task = task;

    // start input server
    this.inputServer = new SaslSocketServer
      (new SpecificResponder(InputProtocol.class, this),
       new InetSocketAddress(0));
    inputServer.start();

    // open output to parent
    task.open(inputServer.getPort());
View Full Code Here

TOP

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

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.