Package org.apache.avro.ipc

Examples of org.apache.avro.ipc.HttpServer


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


    }
   
    this.out = out;
   
    latch = new CountDownLatch(1);
    server = new HttpServer(new SinkResponder(protocol), uri.getPort());
    out.println("Port: " + server.getPort());
    return 0;
  }
View Full Code Here

    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

    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

          .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

              .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

            .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

            responder = new AvroSpecificResponder(configuration.getProtocol(), this);
        }


        if (AVRO_HTTP_TRANSPORT.equalsIgnoreCase(configuration.getTransport())) {
            server = new HttpServer(responder, configuration.getPort());
        } else if (AVRO_NETTY_TRANSPORT.equalsIgnoreCase(configuration.getTransport())) {
            server = new NettyServer(responder, new InetSocketAddress(configuration.getHost(), configuration.getPort()));
        } else {
            throw new IllegalArgumentException("Unknown transport " + configuration.getTransport());
        }
View Full Code Here

TOP

Related Classes of org.apache.avro.ipc.HttpServer

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.