Package com.tryge.xocotl.io

Examples of com.tryge.xocotl.io.DuplexChannel


  public void testOnConnectAndOnDisconnectCallbackDelegation() {
    when(scheduler.scheduleAtFixedRate(same(task), eq(0L), eq(5000L), same(TimeUnit.MILLISECONDS))).thenReturn(future);

    manager.start(5000L);

    DuplexChannel channel = mock(DuplexChannel.class);

    ArgumentCaptor<ConnectCallback> captor = ArgumentCaptor.forClass(ConnectCallback.class);

    verify(factory).newInstance(captor.capture(), same(config));
View Full Code Here


public class ExampleClient implements Runnable {
  @Override
  public void run() {
    try {
      Socket socket = new Socket("localhost", ExampleServer.PORT);
      DuplexChannel channel = SocketChannels.getFactory().newSocketChannel(socket, new NopDecoder());
      channel.open();
      channel.sendAndForget(new ExampleMessage("1", "test"));
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

TOP

Related Classes of com.tryge.xocotl.io.DuplexChannel

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.