Examples of SpecificResponder


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

                          Reporter reporter) throws Exception {
    try {
      // start server
      this.outputService = new TetherOutputService(collector, reporter);
      this.outputServer = new SaslSocketServer
        (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

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

    /**
     * Starts the RPC server.
     */
    public static void main(String[] args) throws Exception {
      SocketServer server = new SocketServer(
          new SpecificResponder(Simple.class, new TestImpl()),
          new InetSocketAddress(0));
      server.start();
      File portFile = new File(SERVER_PORTS_DIR, "java-port");
      FileWriter w = new FileWriter(portFile);
      w.write(Integer.toString(server.getPort()));
View Full Code Here

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

  protected static HandshakeMonitor monitor;

  @Before
  public void testStartServer() throws Exception {
    if (server != null) return;
    responder = new SpecificResponder(Simple.class, new TestImpl());
    server = createServer(responder);
    server.start();
   
    client = createTransceiver();
    SpecificRequestor req = new SpecificRequestor(Simple.class, client);
View Full Code Here

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

  }

  @Test public void testClassLoader() throws Exception {
    ClassLoader loader = new ClassLoader() {};

    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

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

 
  @Test(timeout=30000)
  public void test() throws Exception {
    final CountDownLatch waitLatch = new CountDownLatch(1);
    server = new NettyServer(
        new SpecificResponder(Simple.class, new SimpleImpl(waitLatch)),
        new InetSocketAddress(0),
        new NioServerSocketChannelFactory
          (Executors.newCachedThreadPool(), Executors.newCachedThreadPool()),
        new ExecutionHandler(Executors.newCachedThreadPool()));
    server.start();
View Full Code Here

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

  @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 = initializeServer(responder);
    server.start();
 
    int serverPort = server.getPort();
    System.out.println("server port : " + serverPort);
View Full Code Here

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

public class TestNettyTransceiverWhenServerStops {
  @Test
    public void testNettyTransceiverWhenServerStops() throws Exception {
    Mail mailService = new TestNettyServer.MailImpl();
    Responder responder = new SpecificResponder(Mail.class, mailService);
    NettyServer server = new NettyServer(responder, new InetSocketAddress(0));
    server.start();

    int serverPort = server.getPort();
View Full Code Here

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

  @BeforeClass
  public static void initializeConnections() throws Exception {
    // start server
    System.out.println("starting server...");
    mailService = new MailImpl();
    Responder responder = new SpecificResponder(Mail.class, mailService);
    ChannelFactory channelFactory = new NioServerSocketChannelFactory(
        Executors.newCachedThreadPool(),
        Executors.newCachedThreadPool()
    );
    server = new NettyServer(responder, new InetSocketAddress(0),
View Full Code Here

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

  @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

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

  @Test
  public void test() throws Exception {
    // start server
    System.out.println("starting server...");
    Responder responder = new SpecificResponder(Mail.class, new MailImpl());
    Server server = new NettyServer(responder, new InetSocketAddress(0));
    server.start();

    int serverPort = server.getPort();
    System.out.println("server port : " + serverPort);
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.