Package org.apache.etch.bindings.java.support

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


    };
    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

  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

   */
  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

  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

   */
  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

  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

  {
    // 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

  public static void main(String[] args)
    throws Exception
  {
    String uri = "tcp://0.0.0.0:4001";

    ServerFactory listener = FooHelper.newListener( uri, null, new MainFooListener() );

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

    Log.addSink( null );
    Log.report( "MainAsyncListener" );
   
    String uri = "tcp://0.0.0.0:4003";

    ServerFactory listener = AsyncHelper.newListener( uri, null,
      new MainAsyncListener() );

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

TOP

Related Classes of org.apache.etch.bindings.java.support.ServerFactory

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.