use of sessionport.rpc.group.AnOldGroupCallingConnectListener in project GIPC by pdewan.
the class AnOlderGroupRPCStaticSessionPortLauncher method launchStaticSessionPartipant.
public static void launchStaticSessionPartipant(ServerPortDescription[] aServerList, String anId, String aName) {
Tracer.showInfo(true);
RelayerClientAndServerSupport.setRelayedCommunicaton(false);
GroupRPCSessionPort sessionPort = null;
// fix this later if needed
// GroupRPCStaticSessionPortSelector.createGroupRPCStaticSessionPort(aServerList, anId, aName, REMOTE_END_POINT, null
// );
ConnectionListener connectListener = new AnOldGroupCallingConnectListener(sessionPort);
sessionPort.addConnectionListener(connectListener);
Adder adder = new AnAdder();
sessionPort.register(Adder.class, adder);
Scanner in = new Scanner(System.in);
System.out.println("Press any key to connect to peers");
String message = in.nextLine();
Tracer.info("About to connect to peers");
sessionPort.connect();
}
use of sessionport.rpc.group.AnOldGroupCallingConnectListener in project GIPC by pdewan.
the class AnOldestGroupRPCSessionPortLauncher method launchSessionPartipant.
public static void launchSessionPartipant(String anId, String aName) {
Tracer.showInfo(true);
RelayerClientAndServerSupport.setRelayedCommunicaton(false);
GroupRPCSessionPort sessionPort = GroupRPCSessionPortSelector.createGroupRPCSessionPort("localhost", "" + SESSION_SERVER_PORT, SESSION_SERVER_NAME, "Test Session", anId, aName, ParticipantChoice.MEMBER);
ConnectionListener connectListener = new AnOldGroupCallingConnectListener(sessionPort);
sessionPort.addConnectionListener(connectListener);
Adder adder = new AnAdder();
sessionPort.register(Adder.class, adder);
sessionPort.connect();
}
use of sessionport.rpc.group.AnOldGroupCallingConnectListener in project GIPC by pdewan.
the class AGroupRPCClientLauncher method launchClient.
public static void launchClient(String aName) {
Tracer.showInfo(true);
RelayerClientAndServerSupport.setRelayedCommunicaton(false);
GroupRPCServerInputPort sessionPort = GroupRPCStaticSessionPortSelector.createGroupRPCStaticSessionPort(servers, REMOTE_END_POINT, aName, "Add Servers", ParticipantChoice.SYMMETRIC_JOIN);
ConnectionListener connectListener = new AnOldGroupCallingConnectListener(sessionPort);
sessionPort.addConnectionListener(connectListener);
Adder adder = new AnAdder();
sessionPort.register(Adder.class, adder);
Scanner in = new Scanner(System.in);
String message = in.nextLine();
Tracer.info("About to connect to peers");
sessionPort.connect();
in.nextLine();
}
Aggregations