Search in sources :

Example 1 with AGroupSendingConnectListener

use of sessionport.datacomm.group.buffer.AGroupSendingConnectListener in project GIPC by pdewan.

the class ABufferGroupSessionPortLauncher method launchSessionPartipant.

// public static String SESSION_SERVER_NAME = "Sessions Server";
public static void launchSessionPartipant(String anId, String aName) {
    // Tracer.showInfo(true);
    GroupServerInputPort<ByteBuffer> sessionPort = BufferGroupSessionPortSelector.createBufferGroupSessionPort("localhost", "" + SESSION_SERVER_PORT, SessionServerLauncher.SESSION_SERVER_NAME, "Test Session", anId, aName, ParticipantChoice.MEMBER);
    // DuplexServerInputPort<ByteBuffer> sessionPort =	new ADuplexBufferSessionPortFullP2P("localhost",
    // "" + ASessionsServer.SESSION_SERVER_PORT, ASessionsServer.SESSION_SERVER_NAME, "Test Session", anId, aName);
    // PrintingReplyingReceiveListener printingReplyingReceiveListener = new PrintingReplyingReceiveListener(sessionPort);
    ConnectionListener connectListener = new AGroupSendingConnectListener(sessionPort);
    // sessionPort.addConnectListener(printingReplyingReceiveListener);
    sessionPort.addConnectionListener(connectListener);
    sessionPort.addReceiveListener(new ABufferDuplexReceiveListener());
    // serverInputPort.addDisconnectListener(echoingReceiveListener);
    // sessionPort.addReceiveListener(printingReplyingReceiveListener);
    sessionPort.connect();
}
Also used : ABufferDuplexReceiveListener(sessionport.datacomm.duplex.buffer.ABufferDuplexReceiveListener) AGroupSendingConnectListener(sessionport.datacomm.group.buffer.AGroupSendingConnectListener) ConnectionListener(inputport.ConnectionListener) ByteBuffer(java.nio.ByteBuffer)

Aggregations

ConnectionListener (inputport.ConnectionListener)1 ByteBuffer (java.nio.ByteBuffer)1 ABufferDuplexReceiveListener (sessionport.datacomm.duplex.buffer.ABufferDuplexReceiveListener)1 AGroupSendingConnectListener (sessionport.datacomm.group.buffer.AGroupSendingConnectListener)1