Search in sources :

Example 1 with ACallingConnectListener

use of sessionport.rpc.duplex.relayed.example.ACallingConnectListener in project GIPC by pdewan.

the class ADuplexRPCDirectSessionPortLauncher method launchSessionPartipant.

public static void launchSessionPartipant(String anId, String aName, ParticipantChoice aChoice) {
    // Tracer.showInfo(true);
    ObjectDuplexSessionPortSelector.setDuplexSessionPortFactory(new ADirectObjectDuplexSessionPortFactory());
    // ObjectDuplexSessionPortSelector.setDuplexSessionPortFactory(
    // new ARelayingObjectDuplexSessionPortFactory());
    DuplexRPCSessionPort sessionPort = DuplexRPCSessionPortSelector.createDuplexRPCSessionPort("localhost", "" + SESSION_SERVER_PORT, SESSION_SERVER_NAME, "Test Session", anId, aName, aChoice);
    // DuplexRPCSessionPort sessionPort = DuplexRPCSessionPortSelector.createDuplexRPCSessionPort("localhost",
    // "" + SESSION_SERVER_PORT, aSessionServerName, "Test Session", anId, aName,
    // aChoice
    // );
    ConnectionListener connectListener = new ACallingConnectListener(sessionPort);
    sessionPort.addConnectionListener(connectListener);
    Adder adder = new AnAdder();
    sessionPort.register(Adder.class, adder);
    sessionPort.connect();
}
Also used : ACallingConnectListener(sessionport.rpc.duplex.relayed.example.ACallingConnectListener) ADirectObjectDuplexSessionPortFactory(sessionport.datacomm.duplex.object.direct.ADirectObjectDuplexSessionPortFactory) DuplexRPCSessionPort(sessionport.rpc.duplex.DuplexRPCSessionPort) ConnectionListener(inputport.ConnectionListener) AnAdder(sessionport.rpc.duplex.relayed.example.AnAdder) Adder(sessionport.rpc.duplex.relayed.example.Adder) AnAdder(sessionport.rpc.duplex.relayed.example.AnAdder)

Aggregations

ConnectionListener (inputport.ConnectionListener)1 ADirectObjectDuplexSessionPortFactory (sessionport.datacomm.duplex.object.direct.ADirectObjectDuplexSessionPortFactory)1 DuplexRPCSessionPort (sessionport.rpc.duplex.DuplexRPCSessionPort)1 ACallingConnectListener (sessionport.rpc.duplex.relayed.example.ACallingConnectListener)1 Adder (sessionport.rpc.duplex.relayed.example.Adder)1 AnAdder (sessionport.rpc.duplex.relayed.example.AnAdder)1