Search in sources :

Example 1 with AnObjectDuplexReceiveListener

use of sessionport.datacomm.duplex.object.AnObjectDuplexReceiveListener in project GIPC by pdewan.

the class AnObjectGroupSessionPortLauncher method launchSessionPartipant.

public static void launchSessionPartipant(String anId, String aName, ParticipantChoice aChoice) {
    // Tracer.showInfo(true);
    RelayerClientAndServerSupport.setRelayedCommunicaton(false);
    GroupSessionPort<Object> sessionPort = ObjectGroupSessionPortSelector.createObjectGroupSessionPort("localhost", "" + SESSION_SERVER_PORT, SESSION_SERVER_NAME, "Test Session", anId, aName, aChoice);
    // 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 AnObjectGroupSendingConnectListener(sessionPort);
    // sessionPort.addConnectListener(printingReplyingReceiveListener);
    sessionPort.addConnectionListener(connectListener);
    sessionPort.addReceiveListener(new AnObjectDuplexReceiveListener());
    // serverInputPort.addDisconnectListener(echoingReceiveListener);
    // sessionPort.addReceiveListener(printingReplyingReceiveListener);
    sessionPort.connect();
}
Also used : AnObjectDuplexReceiveListener(sessionport.datacomm.duplex.object.AnObjectDuplexReceiveListener) ConnectionListener(inputport.ConnectionListener)

Example 2 with AnObjectDuplexReceiveListener

use of sessionport.datacomm.duplex.object.AnObjectDuplexReceiveListener in project GIPC by pdewan.

the class AnObjectDuplexSessionPortLauncher method launchSessionPartipant.

public static void launchSessionPartipant(String anId, String aName, ParticipantChoice aJoinChoice) {
    // Tracer.showInfo(true);
    DuplexSessionPort<Object> sessionPort = ObjectDuplexSessionPortSelector.createObjectDuplexSessionPort("localhost", "" + SESSION_SERVER_PORT, SESSION_SERVER_NAME, "Test Session", anId, aName, aJoinChoice);
    ConnectionListener connectListener = new AnObjectSendingConnectListener(sessionPort);
    sessionPort.addConnectionListener(connectListener);
    sessionPort.addReceiveListener(new AnObjectDuplexReceiveListener());
    sessionPort.connect();
}
Also used : AnObjectDuplexReceiveListener(sessionport.datacomm.duplex.object.AnObjectDuplexReceiveListener) ConnectionListener(inputport.ConnectionListener)

Aggregations

ConnectionListener (inputport.ConnectionListener)2 AnObjectDuplexReceiveListener (sessionport.datacomm.duplex.object.AnObjectDuplexReceiveListener)2