use of inputport.rpc.duplex.DuplexRPCServerInputPort in project GIPC by pdewan.
the class GIPCComparableCounterServer method main.
public static void main(String[] args) {
// (new ADuplexRPCInputPortLauncherSupport()).init();
try {
DuplexRPCServerInputPort aServerInputPort = DuplexRPCInputPortSelector.createDuplexRPCServerInputPort(SERVER_PORT, SERVER_NAME);
ComparableCounter counter1 = new AComparableCounter();
ComparableCounter counter2 = new AComparableCounter();
aServerInputPort.register(COUNTER1, counter1);
aServerInputPort.register(COUNTER2, counter2);
aServerInputPort.connect();
} catch (Exception e) {
e.printStackTrace();
}
}
use of inputport.rpc.duplex.DuplexRPCServerInputPort in project GIPC by pdewan.
the class ADelayingRelayingSessionsServerLauncher method main.
public static void main(String[] args) {
// Tracer.showInfo(true);
// Message.setKeyWordStatus(Message.ALL_KEYWORDS, false);
// Message.setKeyWordStatus("nioip", true);
// GlobalState.setDelayServerBufferSends(true);
// GlobalState.getDelayManager().setMinimumDelay("Alice", 1000);
// GlobalState.getDelayManager().setMinimumDelay("Bob", 100);
// GlobalState.getDelayManager().setMinimumDelay("Cathy", 500);
// GroupRPCServerInputPort serverInputPort = GroupRPCInputPortSelector.createGroupRPCServerInputPort("" +
// ASessionsServer.SESSION_SERVER_PORT, ASessionsServer.SESSION_SERVER_NAME);
DuplexRPCServerInputPort serverInputPort = DuplexRPCInputPortSelector.createDuplexRPCServerInputPort("" + SESSION_SERVER_PORT, SESSION_SERVER_NAME);
RelayerSupportingSessionServer sessionServer = new ARelayerSupportingSessionServer(serverInputPort);
ServerPortDescription serverPortDescription = new AServerPortDescription("localhost", "" + RELAYER_PORT, RELAYER_NAME);
sessionServer.setRelayerDescripton(serverPortDescription);
serverInputPort.register(RelayerSupportingSessionServer.class, sessionServer);
serverInputPort.register(SESSION_SERVER_NAME, sessionServer);
serverInputPort.connect();
GroupRPCServerInputPort relayerPort = GroupRPCInputPortSelector.createGroupRPCServerInputPort("" + RELAYER_PORT, RELAYER_NAME);
Relayer relayer = new ARelayer(relayerPort);
relayerPort.register(Relayer.class, relayer);
serverInputPort.register(RELAYER_NAME, relayer);
relayerPort.connect();
}
use of inputport.rpc.duplex.DuplexRPCServerInputPort in project GIPC by pdewan.
the class ADelayingSessionsServerLauncher method main.
// public static int RELAYER_PORT = 9091;
// public static String RELAYER_NAME = "Relayer";
public static void main(String[] args) {
Tracer.showInfo(true);
// Message.setKeyWordStatus(Message.ALL_KEYWORDS, false);
// Message.setKeyWordStatus("nioip", true);
DelayUtlity.setDelayServerBufferSends();
DelayUtlity.getDelayManager().setMinimumDelay("Alice", 1000);
DelayUtlity.getDelayManager().setMinimumDelay("Bob", 100);
DelayUtlity.getDelayManager().setMinimumDelay("Cathy", 500);
// GroupRPCServerInputPort serverInputPort = GroupRPCInputPortSelector.createGroupRPCServerInputPort("" +
// ASessionsServer.SESSION_SERVER_PORT, ASessionsServer.SESSION_SERVER_NAME);
DuplexRPCServerInputPort serverInputPort = DuplexRPCInputPortSelector.createDuplexRPCServerInputPort("" + SESSION_SERVER_PORT, SESSION_SERVER_NAME);
RelayerSupportingSessionServer sessionServer = new ARelayerSupportingSessionServer(serverInputPort);
// ServerPortDescription serverPortDescription = new AServerPortDescription("localhost", "" + RELAYER_PORT, RELAYER_NAME);
// sessionServer.setRelayerDescripton(serverPortDescription);
serverInputPort.register(RelayerSupportingSessionServer.class, sessionServer);
serverInputPort.register(SESSION_SERVER_NAME, sessionServer);
serverInputPort.connect();
// DuplexRPCServerInputPort relayerPort = DuplexRPCInputPortSelector.createDuplexRPCServerInputPort("" +
// RELAYER_PORT, RELAYER_NAME);
// Relayer relayer = new ARelayer(relayerPort);
// relayerPort.register(Relayer.class, relayer);
// serverInputPort.register(RELAYER_NAME, relayer);
//
//
// relayerPort.connect();
}
use of inputport.rpc.duplex.DuplexRPCServerInputPort in project GIPC by pdewan.
the class ASingleResponseSessionServerCreator method createSingleResponseDuplexSessionServer.
public static DuplexRPCServerInputPort createSingleResponseDuplexSessionServer(String aServerId, String aServerName, String aLogicalServerName) {
DuplexRPCServerInputPort serverInputPort = ASessionsServerCreator.createSessionsServer(aServerId, aServerName, aLogicalServerName);
DuplexSingleResponseUtlity.supportSingleResponse(serverInputPort);
return serverInputPort;
}
use of inputport.rpc.duplex.DuplexRPCServerInputPort in project GIPC by pdewan.
the class AReplicatedSessionServerLauncher method launchServer.
public static void launchServer(String aSessionServerName, String aSessionServerPort) {
Tracer.showInfo(true);
DuplexRPCServerInputPort serverInputPort = DuplexRPCInputPortSelector.createDuplexRPCServerInputPort("" + aSessionServerPort, aSessionServerName);
DuplexSingleResponseUtlity.supportSingleResponse(serverInputPort);
SessionServer sessionServer = new ASessionServer(serverInputPort);
// RelayerSupportingSessionsServer sessionServer = new ARelayerSupportingSessionsServer(serverInputPort);
serverInputPort.register(RelayerSupportingSessionServer.class, sessionServer);
serverInputPort.register(AFaultTolerantSessionPortLauncher.SESSION_SERVER_NAME, sessionServer);
serverInputPort.connect();
}
Aggregations