Examples of Args


Examples of org.apache.thrift.server.TNonblockingServer.Args

  private Thread serverThread;
  private TServer server;
  private static final int NUM_QUERIES = 1000;

  protected TServer getServer(TProcessor processor, TNonblockingServerSocket socket, TProtocolFactory protoFactory, TTransportFactory factory) {
    final Args args = new Args(socket).processor(processor).protocolFactory(protoFactory);
    if (factory != null) {
      args.transportFactory(factory);
    }
    return new TNonblockingServer(args);
  }
View Full Code Here

Examples of org.apache.thrift.server.TNonblockingServer.Args

  private Thread serverThread;
  private TServer server;
  private static final int NUM_QUERIES = 1000;

  protected TServer getServer(TProcessor processor, TNonblockingServerSocket socket, TProtocolFactory protoFactory, TTransportFactory factory) {
    final Args args = new Args(socket).processor(processor).protocolFactory(protoFactory);
    if (factory != null) {
      args.transportFactory(factory);
    }
    return new TNonblockingServer(args);
  }
View Full Code Here

Examples of org.apache.thrift.server.TNonblockingServer.Args

  private Thread serverThread;
  private TServer server;
  private static final int NUM_QUERIES = 10000;

  protected TServer getServer(TProcessor processor, TNonblockingServerSocket socket, TProtocolFactory protoFactory) {
    return new TNonblockingServer(new Args(socket).processor(processor).protocolFactory(protoFactory));
  }
View Full Code Here

Examples of org.apache.thrift.server.TServer.Args

  throws Exception {
    serverThread = new Thread() {
      public void run() {
        try {
          TServerTransport serverTransport = TSSLTransportFactory.getServerSocket(PORT);
          server = new TSimpleServer(new Args(serverTransport).processor(processor));
          server.serve();
        } catch (TTransportException e) {
          e.printStackTrace();
          assert false;
        }
View Full Code Here

Examples of org.apache.thrift.server.TServer.Args

            TServerSocket socket = new TServerSocket(PORT);

            TTransportFactory factory = new TSaslServerTransport.Factory(
              WRAPPED_MECHANISM, SERVICE, HOST, WRAPPED_PROPS,
              new TestSaslCallbackHandler(PASSWORD));
            server = new TSimpleServer(new Args(socket).processor(processor).transportFactory(factory).protocolFactory(protoFactory));

            // Run it
            LOGGER.debug("Starting the server on port {}", PORT);
            server.serve();
          } catch (Exception e) {
View Full Code Here

Examples of org.apache.thrift.server.TServer.Args

    final ContainerOfEnumsTestService.Processor<EchoServiceDefinition> processor =
        new ContainerOfEnumsTestService.Processor<EchoServiceDefinition>(
            new EchoServiceDefinition(protocol));
    final TServerTransport transport = new TServerSocket(port);

    final Args serviceArguments = new Args(transport);
    serviceArguments.processor(processor);
    serviceArguments.protocolFactory(Enum.valueOf(Protocol.class, protocol).getFactory());

    final TServer server = new TSimpleServer(serviceArguments);

    log.info("Provisioned everything; now serving {} requests on {}...", protocol,port);
View Full Code Here

Examples of org.apache.thrift.server.TServer.Args

  throws Exception {
    serverThread = new Thread() {
      public void run() {
        try {
          TServerTransport serverTransport = TSSLTransportFactory.getServerSocket(PORT);
          final Args args = new Args(serverTransport).processor(processor);
          server = new TSimpleServer(args);
          server.serve();
        } catch (TTransportException e) {
          e.printStackTrace();
          assert false;
View Full Code Here

Examples of org.apache.thrift.server.TServer.Args

            TServerSocket socket = new TServerSocket(PORT);

            TTransportFactory factory = new TSaslServerTransport.Factory(
              WRAPPED_MECHANISM, SERVICE, HOST, WRAPPED_PROPS,
              new TestSaslCallbackHandler(PASSWORD));
            server = new TSimpleServer(new Args(socket).processor(processor).transportFactory(factory).protocolFactory(protoFactory));

            // Run it
            LOGGER.debug("Starting the server on port {}", PORT);
            server.serve();
          } catch (Exception e) {
View Full Code Here

Examples of org.apache.thrift.server.TServer.Args

  }

  public static void simple(Calculator.Processor processor) {
    try {
      TServerTransport serverTransport = new TServerSocket(9090);
      TServer server = new TSimpleServer(new Args(serverTransport).processor(processor));

      // Use this for a multithreaded server
      // TServer server = new TThreadPoolServer(new TThreadPoolServer.Args(serverTransport).processor(processor));

      System.out.println("Starting the simple server...");
View Full Code Here

Examples of org.apache.thrift.server.TServer.Args

       *
       * Note: You need not explicitly call open(). The underlying server socket is bound on return
       * from the factory class.
       */
      TServerTransport serverTransport = TSSLTransportFactory.getServerSocket(9091, 0, null, params);
      TServer server = new TSimpleServer(new Args(serverTransport).processor(processor));

      // Use this for a multi threaded server
      // TServer server = new TThreadPoolServer(new TThreadPoolServer.Args(serverTransport).processor(processor));

      System.out.println("Starting the secure server...");
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.