use of sessionport.datacomm.duplex.buffer.ASendingConnectListener in project GIPC by pdewan.
the class ABufferDuplexSessionPortLauncher method launchSessionPartipant.
public static void launchSessionPartipant(String anId, String aName, ParticipantChoice aJoinChoice) {
// Tracer.showInfo(true);
DuplexSessionPort<ByteBuffer> sessionPort = BufferDuplexSessionPortSelector.createBufferDuplexSessionPort("localhost", "" + SESSION_SERVER_PORT, 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 ASendingConnectListener(sessionPort);
// sessionPort.addConnectListener(printingReplyingReceiveListener);
sessionPort.addConnectionListener(connectListener);
sessionPort.addReceiveListener(new ABufferDuplexReceiveListener());
// serverInputPort.addDisconnectListener(echoingReceiveListener);
// sessionPort.addReceiveListener(printingReplyingReceiveListener);
sessionPort.connect();
}
Aggregations