Package org.apache.avro.ipc

Examples of org.apache.avro.ipc.HttpTransceiver


    dRes.addRPCPlugin(dPlugin);
    HttpServer server3 = new HttpServer(dRes, 21007);
    server3.start();
   
    // Root requestor
    HttpTransceiver trans = new HttpTransceiver(
        new URL("http://localhost:21005"));
   
    GenericRequestor r = new GenericRequestor(advancedProtocol, trans);
    r.addRPCPlugin(aPlugin);
   
View Full Code Here


    HttpServer server3 = new HttpServer(dRes, 21007);
    server3.start();
   
   
    // Root requestors
    HttpTransceiver trans1 = new HttpTransceiver(
        new URL("http://localhost:21005")); // recurse
    HttpTransceiver trans2 = new HttpTransceiver(
        new URL("http://localhost:21007")); // no recurse
   
   
    GenericRequestor r1 = new GenericRequestor(advancedProtocol, trans1);
    r1.addRPCPlugin(aPlugin);
View Full Code Here

    }
  }
 
  @Test(expected = Exception.class)
  public void testConnectionRefusedOneWay() throws IOException {
    Transceiver client = new HttpTransceiver(new URL("http://localhost:4444"));
    SpecificRequestor req = new SpecificRequestor(Simple.class, client);
    addRpcPlugins(req);
    Simple proxy = SpecificRequestor.getClient(Simple.class, (SpecificRequestor)req);
    proxy.ack();
  }
View Full Code Here

    Protocol protocol;
   
    public RecursingResponder(Protocol local, RPCPlugin plugin)
    throws Exception {
      super(local);
      transC = new HttpTransceiver(
          new URL("http://localhost:21006"));
      transD = new HttpTransceiver(
          new URL("http://localhost:21007"));
      reqC = new GenericRequestor(local, transC);
      reqC.addRPCPlugin(plugin);
      reqD = new GenericRequestor(local, transD);
      reqD.addRPCPlugin(plugin);
View Full Code Here

  static Object proxy;

  @BeforeClass
  public static void initializeProxy() throws Exception {
    HttpTransceiver client = new HttpTransceiver(new URL("http://localhost"));
    SpecificRequestor requestor = new SpecificRequestor(SampleSpecificProtocol.class, client);
    proxy = SpecificRequestor.getClient(SampleSpecificProtocol.class, requestor);
  }
View Full Code Here

      new SaslSocketTransceiver(new InetSocketAddress(clientPort));
      this.outputClient = SpecificRequestor.getClient(OutputProtocol.class, clientTransceiver);
      break;

    case HTTP:
      this.clientTransceiver =new HttpTransceiver(new URL("http://127.0.0.1:"+clientPort));
      this.outputClient = SpecificRequestor.getClient(OutputProtocol.class, clientTransceiver);
      break;
    }

    // send inputPort to parent
View Full Code Here

      switch (proto) {
      case SASL:
        this.clientTransceiver =new SaslSocketTransceiver(new InetSocketAddress(outputService.inputPort()));
        break;
      case HTTP:
        this.clientTransceiver =new HttpTransceiver(new URL("http://127.0.0.1:"+outputService.inputPort()));
        break;
      default:
        throw new RuntimeException("Error: code to handle this protocol is not implemented");
      }
View Full Code Here

        this._url = url;
    }
   
    @Override
    public Transceiver newTransceiver() {
        return new HttpTransceiver(_url);
    }
View Full Code Here

          + hostname + " port:" + port, e);
    }

    LogLog.debug("using url:" + url);

    Transceiver transciever = new HttpTransceiver(url);
    FlumeEventAvroServer client = null;

    try {
      client = SpecificRequestor.getClient(FlumeEventAvroServer.class,
          transciever);
View Full Code Here

  }

  @Test
  public void testGetAllReports() throws IOException {

    transport = new HttpTransceiver(url);
    try {
      this.avroClient = (AvroFlumeReportServer) SpecificRequestor.getClient(
          AvroFlumeReportServer.class, transport);
    } catch (Exception e) {
      throw new IOException("Failed to open AvroReportServer at " + PORT
View Full Code Here

TOP

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

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.