Package org.apache.avro.specific

Examples of org.apache.avro.specific.SpecificResponder


public class TestProtocolHttp extends TestProtocolSpecific {

  @Before
  public void testStartServer() throws Exception {
    server =
      new HttpServer(new SpecificResponder(Simple.class, new TestImpl()), 0);
    client =
      new HttpTransceiver(new URL("http://127.0.0.1:"+server.getPort()+"/"));
    proxy = (Simple)SpecificRequestor.getClient(Simple.class, client);
  }
View Full Code Here


  protected static Transceiver client;
  protected static Simple proxy;

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

    /**
     * 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));
      File portFile = new File(SERVER_PORTS_DIR, "java-port");
      FileWriter w = new FileWriter(portFile);
      w.write(Integer.toString(server.getPort()));
      w.close();
View Full Code Here

    private HttpServer server;

    public void serve() throws IOException {
      LOG.info("Starting dummy server");
      SpecificResponder res = new SpecificResponder(
          FlumeMasterAdminServerAvro.class, this);
      this.server = new HttpServer(res, 56789);
      this.server.start();
    }
View Full Code Here

  /**
   * This blocks till the server starts.
   */
  public void start() throws IOException {
    SpecificResponder res = new SpecificResponder(FlumeEventAvroServer.class,
        this);
    this.http = new HttpServer(res, port);
    this.http.start();
  }
View Full Code Here

  /**
   * Starts the Avro Report Server
   */
  public void serve() throws IOException {
    SpecificResponder res = new SpecificResponder(AvroFlumeReportServer.class,
        this);
    this.http = new HttpServer(res, port);
    this.http.start();
  }
View Full Code Here

  @Override
  public void serve() throws IOException {
    LOG.info(String.format(
        "Starting blocking thread pool server for admin server on port %d...",
        port));
    SpecificResponder res = new SpecificResponder(
        FlumeMasterAdminServerAvro.class, this);
    this.server = new HttpServer(res, port);
    this.server.start();
  }
View Full Code Here

      LOG
      .info(String
          .format(
              "Starting blocking thread pool server for control server on port %d...",
              port));
      SpecificResponder res = new SpecificResponder(
          AvroFlumeClientServer.class, this);
      this.server = new HttpServer(res, port);
      this.server.start();
    }
View Full Code Here

      LOG
          .info(String
              .format(
                  "Starting blocking thread pool server for control server on port %d...",
                  port));
      SpecificResponder res = new SpecificResponder(
          AvroFlumeClientServer.class, this);
      this.server = new HttpServer(res, port);
      this.server.start();
    }
View Full Code Here

    LOG
        .info(String
            .format(
                "Starting blocking thread pool server for control server on port %d...",
                port));
    SpecificResponder res = new SpecificResponder(AvroFlumeClientServer.class,
        this);
    this.server = new HttpServer(res, port);
    this.server.start();
  }
View Full Code Here

TOP

Related Classes of org.apache.avro.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.