Examples of ServerFactory


Examples of io.dropwizard.server.ServerFactory

            }
        });
    }

    private int getHttpPort(Configuration config) {
        ServerFactory serverFactory = config.getServerFactory();
        if (!(serverFactory instanceof DefaultServerFactory)) {
            throw new IllegalStateException("Server factory is not an instance of DefaultServerFactory");
        }

        List<ConnectorFactory> connectors = ((DefaultServerFactory) serverFactory).getApplicationConnectors();
View Full Code Here

Examples of io.dropwizard.server.ServerFactory

        throw new IllegalStateException("Unable to determine HTTP port");
    }

    private int getAdminHttpPort(Configuration config) {
        ServerFactory serverFactory = config.getServerFactory();
        if (!(serverFactory instanceof DefaultServerFactory)) {
            throw new IllegalStateException("Server factory is not an instance of DefaultServerFactory");
        }

        List<ConnectorFactory> connectors = ((DefaultServerFactory) serverFactory).getAdminConnectors();
View Full Code Here

Examples of org.apache.etch.bindings.java.support.ServerFactory

    Log.addSink( null );
    Log.report( "MainPerfListener" );
   
    final String uri = "tcp://localhost:4004";
   
    ServerFactory listener = PerfHelper.newListener( uri, null,
      new MainPerfListener() );

    listener.transportControl( Transport.START_AND_WAIT_UP, 4000 );
   
    System.out.println( "ready" );
  }
View Full Code Here

Examples of org.apache.etch.bindings.java.support.ServerFactory

    };
    startListener = args.length == 1 && args[0].equals( "startListener" );

    implFactory = new MainPerfClient();

    final ServerFactory listener;

    if (startListener)
    {
      listener = PerfHelper.newListener( uri, null, implFactory );
      listener.transportControl( Transport.START_AND_WAIT_UP, maxWaitTime );
    }
    else
    {
      listener = null;
    }

    // make sure test interfaces work.
   
    qualify();

    // run tests

    for (int nThreads : threadCounts)
    {
      perfAdd( nThreads );
      perfAsyncAdd( nThreads );
      perfReport( nThreads );
      if (full)
      {
        perfSum( nThreads );
        perfDist( nThreads );
        perfAdd2( nThreads );
        perfReport2( nThreads );
      }
    }

    if (listener != null)
      listener.transportControl( Transport.STOP_AND_WAIT_DOWN, maxWaitTime );
  }
View Full Code Here

Examples of org.apache.etch.bindings.java.support.ServerFactory

  public static void main( String[] args ) throws Exception
  {
    // TODO Change to correct URI
    String uri = "tcp://0.0.0.0:4002";
   
    ServerFactory listener = ExampleHelper.newListener( uri, null,
      new MainExampleListener() );

    // Start the Listener
    listener.transportControl( Transport.START_AND_WAIT_UP, 4000 );
  }
View Full Code Here

Examples of org.apache.etch.bindings.java.support.ServerFactory

   */
  public static void main( String[] args ) throws Exception
  {
    String uri = "tcp://0.0.0.0:4007";
   
    ServerFactory listener = DistributedHashTableHelper.newListener( uri, null,
      new MainDistributedHashTableListener() );

    listener.transportControl( Transport.START_AND_WAIT_UP, 4000 );
  }
View Full Code Here

Examples of org.apache.etch.bindings.java.support.ServerFactory

  public static void main( String[] args ) throws Exception
  {
    // TODO Change to correct URI
    String uri = "tcp://127.0.0.1:4001";
   
    ServerFactory listener = ExampleHelper.newListener( uri, null,
      new MainExampleListener() );

    // Start the Listener
    listener.transportControl( Transport.START_AND_WAIT_UP, 4000 );
  }
View Full Code Here

Examples of org.apache.etch.bindings.java.support.ServerFactory

   */
  public static void main( String[] args ) throws Exception
  {
    String uri = "tcp://0.0.0.0:4001";
   
    ServerFactory listener = TypesHelper.newListener( uri, null,
      new MainTypesListener() );

    listener.transportControl( Transport.START_AND_WAIT_UP, 4000 );
  }
View Full Code Here

Examples of org.apache.etch.bindings.java.support.ServerFactory

  public static void main(String[] args)
    throws Exception
  {
    String uri = "tcp://0.0.0.0:4006";
   
    ServerFactory listener = ClosingHelper.newListener( uri, null, new MainClosingListener() );

    listener.transportControl( Transport.START_AND_WAIT_UP, 4000 );
   
    InetSocketAddress localAddr = (InetSocketAddress) listener.transportQuery( TcpListener.LOCAL_ADDRESS );
    URL u = new URL( "tcp:" );
    u.setHost( localAddr.getHostName() );
    u.setPort( localAddr.getPort() );
    localUri = u.toString();
  }
View Full Code Here

Examples of org.apache.etch.bindings.java.support.ServerFactory

  {
    // TODO Change to correct URI
    //String uri = "udp://127.0.0.1:4001";
    String uri = "tcp://127.0.0.1:4001";
   
    ServerFactory listener = HelloWorldHelper.newListener( uri, null,
      new MainHelloWorldListener() );

    // Start the Listener
    listener.transportControl( Transport.START_AND_WAIT_UP, 4000 );
  }
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.