Examples of startSynchronously()


Examples of com.gitblit.fanout.FanoutClient.startSynchronously()

    Thread.sleep(500);

    // restart client
    client.stop();
    Thread.sleep(1000);
    client.startSynchronously();

    // ping and wait for pong
    client.ping();
    Thread.sleep(500);
View Full Code Here

Examples of com.gitblit.fanout.FanoutClient.startSynchronously()

      public void announcement(String channel, String message) {
        announcementsA.put(channel, message);
      }
    });

    clientA.startSynchronously();

    final Map<String, String> announcementsB = new ConcurrentHashMap<String, String>();
    FanoutClient clientB = new FanoutClient("localhost", fanoutPort);
    clientB.addListener(new FanoutAdapter() {
      @Override
View Full Code Here

Examples of com.gitblit.fanout.FanoutClient.startSynchronously()

      @Override
      public void announcement(String channel, String message) {
        announcementsB.put(channel, message);
      }
    });
    clientB.startSynchronously();


    // subscribe clients A and B to the channels
    clientA.subscribe("a");
    clientA.subscribe("b");
View Full Code Here

Examples of com.gitblit.fanout.FanoutClient.startSynchronously()

      @Override
      public void pong(Date timestamp) {
        pongCount.incrementAndGet();
      }
    });
    client.startSynchronously();

    // ping and wait for pong
    client.ping();
    Thread.sleep(500);
View Full Code Here

Examples of com.linkedin.databus2.test.container.SimpleTestClientConnection.startSynchronously()

    boolean serverStarted = srvConn.startSynchronously(101, CONNECT_TIMEOUT_MS);
    Assert.assertTrue(serverStarted, "server started");

    final SimpleTestClientConnection clientConn = new SimpleTestClientConnection(eventFactory.getByteOrder());
    clientConn.setPipelineFactory(new SimpleClientPipelineFactoryWithSleep(200));
    boolean clientConnected = clientConn.startSynchronously(101, CONNECT_TIMEOUT_MS);
    Assert.assertTrue(clientConnected, "client connected");

    //hook in to key places in the server pipeline
    ChannelPipeline lastSrvConnPipeline = srvConn.getLastConnChannel().getPipeline();
    SimpleTestMessageReader srvMsgReader = (SimpleTestMessageReader)lastSrvConnPipeline.get(
View Full Code Here

Examples of com.linkedin.databus2.test.container.SimpleTestClientConnection.startSynchronously()

    boolean serverStarted = srvConn.startSynchronously(1, CONNECT_TIMEOUT_MS);
    Assert.assertTrue(serverStarted, "server started");

    SimpleTestClientConnection clientConn = new SimpleTestClientConnection(_eventFactory.getByteOrder());
    clientConn.setPipelineFactory(new SimpleClientPipelineFactory());
    boolean clientConnected = clientConn.startSynchronously(1, CONNECT_TIMEOUT_MS);
    Assert.assertTrue(clientConnected, "client connected");

    //hook in to key places in the server pipeline
    ChannelPipeline lastSrvConnPipeline = srvConn.getLastConnChannel().getPipeline();
    ExtendedReadTimeoutHandler srvTimeoutHandler =
View Full Code Here

Examples of com.linkedin.databus2.test.container.SimpleTestClientConnection.startSynchronously()

    boolean serverStarted = srvConn.startSynchronously(2, CONNECT_TIMEOUT_MS);
    Assert.assertTrue(serverStarted, "server started");

    SimpleTestClientConnection clientConn = new SimpleTestClientConnection(_eventFactory.getByteOrder());
    clientConn.setPipelineFactory(new SimpleClientPipelineFactory());
    boolean clientConnected = clientConn.startSynchronously(2, CONNECT_TIMEOUT_MS);
    Assert.assertTrue(clientConnected, "client connected");

    //hook in to key places in the server pipeline
    ChannelPipeline lastSrvConnPipeline = srvConn.getLastConnChannel().getPipeline();
    ExtendedReadTimeoutHandler srvTimeoutHandler =
View Full Code Here

Examples of com.linkedin.databus2.test.container.SimpleTestClientConnection.startSynchronously()

    boolean serverStarted = srvConn.startSynchronously(3, CONNECT_TIMEOUT_MS);
    Assert.assertTrue(serverStarted, "server started");

    SimpleTestClientConnection clientConn = new SimpleTestClientConnection(_eventFactory.getByteOrder());
    clientConn.setPipelineFactory(new SimpleClientPipelineFactory());
    boolean clientConnected = clientConn.startSynchronously(3, CONNECT_TIMEOUT_MS);
    Assert.assertTrue(clientConnected, "client connected");

    //hook in to key places in the server pipeline
    ChannelPipeline lastSrvConnPipeline = srvConn.getLastConnChannel().getPipeline();
    ExtendedReadTimeoutHandler srvTimeoutHandler =
View Full Code Here

Examples of com.linkedin.databus2.test.container.SimpleTestClientConnection.startSynchronously()

    boolean serverStarted = srvConn.startSynchronously(4, CONNECT_TIMEOUT_MS);
    Assert.assertTrue(serverStarted, "server started");

    SimpleTestClientConnection clientConn = new SimpleTestClientConnection(_eventFactory.getByteOrder());
    clientConn.setPipelineFactory(new SimpleClientPipelineFactory());
    boolean clientConnected = clientConn.startSynchronously(4, CONNECT_TIMEOUT_MS);
    Assert.assertTrue(clientConnected, "client connected");

    //hook in to key places in the server pipeline
    ChannelPipeline lastSrvConnPipeline = srvConn.getLastConnChannel().getPipeline();
    ExtendedReadTimeoutHandler srvTimeoutHandler =
View Full Code Here

Examples of com.linkedin.databus2.test.container.SimpleTestServerConnection.startSynchronously()

  {
    DbusEventFactory eventFactory = new DbusEventV1Factory();

    SimpleTestServerConnection srvConn = new SimpleTestServerConnection(eventFactory.getByteOrder());
    srvConn.setPipelineFactory(new SimpleServerPipelineFactory());
    boolean serverStarted = srvConn.startSynchronously(101, CONNECT_TIMEOUT_MS);
    Assert.assertTrue(serverStarted, "server started");

    final SimpleTestClientConnection clientConn = new SimpleTestClientConnection(eventFactory.getByteOrder());
    clientConn.setPipelineFactory(new SimpleClientPipelineFactoryWithSleep(200));
    boolean clientConnected = clientConn.startSynchronously(101, CONNECT_TIMEOUT_MS);
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.