Package org.apache.avro.specific

Examples of org.apache.avro.specific.SpecificResponder


  protected static Transceiver client;
  protected static TestNamespace proxy;

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


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

  private static BulkData proxy;

  @Before
  public void startServer() throws Exception {
    server =
      new HttpServer(new SpecificResponder(BulkData.class, new BulkDataImpl()),
                     0);
    client =
      new HttpTransceiver(new URL("http://127.0.0.1:"+server.getPort()+"/"));
    proxy = (BulkData)SpecificRequestor.getClient(BulkData.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

    public void start() throws IOException
    {
        if (logger.isDebugEnabled())
            logger.debug(String.format("Binding avro service to %s:%s", listenAddr, listenPort));
        CassandraServer cassandraServer = new CassandraServer();
        SpecificResponder responder = new SpecificResponder(Cassandra.class, cassandraServer);
       
        logger.info("Listening for avro clients...");

        // FIXME: This isn't actually binding to listenAddr (it should).
        server = new org.mortbay.jetty.Server(listenPort);
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

                          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

    public void start() throws IOException
    {
        if (logger.isDebugEnabled())
            logger.debug(String.format("Binding avro service to %s:%s", listenAddr, listenPort));
        CassandraServer cassandraServer = new CassandraServer();
        SpecificResponder responder = new SpecificResponder(Cassandra.class, cassandraServer);
       
        logger.info("Listening for avro clients...");

        // FIXME: This isn't actually binding to listenAddr (it should).
        server = new org.mortbay.jetty.Server(listenPort);
View Full Code Here

      // Print out usage if we get to here.
      printUsageAndExit();
    }
    Log LOG = LogFactory.getLog("AvroServer");
    LOG.info("starting HBase Avro server on port " + Integer.toString(port));
    SpecificResponder r = new SpecificResponder(HBase.class, new HBaseImpl());
    new HttpServer(r, 9090);
    Thread.sleep(1000000);
  }
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.