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();
}
Aggregations