Search in sources :

Example 6 with DuplexRPCServerInputPort

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();
    }
}
Also used : DuplexRPCServerInputPort(inputport.rpc.duplex.DuplexRPCServerInputPort)

Example 7 with DuplexRPCServerInputPort

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();
}
Also used : RelayerSupportingSessionServer(port.sessionserver.relay.RelayerSupportingSessionServer) ARelayerSupportingSessionServer(port.sessionserver.relay.ARelayerSupportingSessionServer) ServerPortDescription(port.sessionserver.ServerPortDescription) AServerPortDescription(port.sessionserver.AServerPortDescription) ARelayer(port.relay.ARelayer) Relayer(port.relay.Relayer) AServerPortDescription(port.sessionserver.AServerPortDescription) ARelayer(port.relay.ARelayer) DuplexRPCServerInputPort(inputport.rpc.duplex.DuplexRPCServerInputPort) ARelayerSupportingSessionServer(port.sessionserver.relay.ARelayerSupportingSessionServer) GroupRPCServerInputPort(inputport.rpc.group.GroupRPCServerInputPort)

Example 8 with DuplexRPCServerInputPort

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();
}
Also used : RelayerSupportingSessionServer(port.sessionserver.relay.RelayerSupportingSessionServer) ARelayerSupportingSessionServer(port.sessionserver.relay.ARelayerSupportingSessionServer) DuplexRPCServerInputPort(inputport.rpc.duplex.DuplexRPCServerInputPort) ARelayerSupportingSessionServer(port.sessionserver.relay.ARelayerSupportingSessionServer)

Example 9 with DuplexRPCServerInputPort

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;
}
Also used : DuplexRPCServerInputPort(inputport.rpc.duplex.DuplexRPCServerInputPort)

Example 10 with DuplexRPCServerInputPort

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();
}
Also used : DuplexRPCServerInputPort(inputport.rpc.duplex.DuplexRPCServerInputPort) ASessionServer(port.sessionserver.ASessionServer) ASessionServer(port.sessionserver.ASessionServer) RelayerSupportingSessionServer(port.sessionserver.relay.RelayerSupportingSessionServer) SessionServer(port.sessionserver.SessionServer)

Aggregations

DuplexRPCServerInputPort (inputport.rpc.duplex.DuplexRPCServerInputPort)11 RelayerSupportingSessionServer (port.sessionserver.relay.RelayerSupportingSessionServer)3 ARelayerSupportingSessionServer (port.sessionserver.relay.ARelayerSupportingSessionServer)2 ADuplexUpperCaser (examples.mvc.local.duplex.ADuplexUpperCaser)1 DuplexUpperCaser (examples.mvc.local.duplex.DuplexUpperCaser)1 GroupRPCServerInputPort (inputport.rpc.group.GroupRPCServerInputPort)1 ARelayer (port.relay.ARelayer)1 Relayer (port.relay.Relayer)1 AServerPortDescription (port.sessionserver.AServerPortDescription)1 ASessionServer (port.sessionserver.ASessionServer)1 ServerPortDescription (port.sessionserver.ServerPortDescription)1 SessionServer (port.sessionserver.SessionServer)1