Search in sources :

Example 1 with AServerPortDescription

use of port.sessionserver.AServerPortDescription in project GIPC by pdewan.

the class ADynamicServerLatecomerClientLauncher method joinSessionServer.

@Override
protected JoinInfo joinSessionServer() {
    // created before session join so  MVC server description and message list is null
    dynamicServerSessionObserver = new ADynamicServerSessionObserver(serverName, null, clientName, null, (GenericRelayingCollaborativeFrostyModel) getFrostyModel(), null, this);
    dynamicServerSessionObserver.initInputPort(mainPort);
    return ((LatecomerSessionServer) sessionServerProxy).lateJoin(sessionName, new AServerPortDescription(null, null, clientName), dynamicServerSessionObserver);
}
Also used : AServerPortDescription(port.sessionserver.AServerPortDescription) GenericRelayingCollaborativeFrostyModel(port.relay.mvc.example.GenericRelayingCollaborativeFrostyModel) LatecomerSessionServer(port.sessionserver.relay.late.LatecomerSessionServer)

Example 2 with AServerPortDescription

use of port.sessionserver.AServerPortDescription in project GIPC by pdewan.

the class AThreeIndepPortClientLauncher method createUI.

protected void createUI(InputPort anInputPort) {
    JoinInfo joinInfo = sessionServerProxy.join(sessionName, new AServerPortDescription(null, null, clientName), new APrintingSessionObserver());
    processInitialSessionMembers(joinInfo);
    super.createUI(anInputPort);
}
Also used : JoinInfo(port.sessionserver.JoinInfo) AServerPortDescription(port.sessionserver.AServerPortDescription) APrintingSessionObserver(port.sessionserver.example.APrintingSessionObserver)

Example 3 with AServerPortDescription

use of port.sessionserver.AServerPortDescription 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 4 with AServerPortDescription

use of port.sessionserver.AServerPortDescription in project GIPC by pdewan.

the class ADelayingRelayerLauncher method main.

public static void main(String[] args) {
    // Tracer.showInfo(true);
    // Message.setKeyWordStatus(Message.ALL_KEYWORDS, false);
    // Message.setKeyWordStatus("nioip", true);
    // GlobalState.setDelayServerBufferSends(true);
    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);
    GroupRPCServerInputPort serverInputPort = GroupRPCInputPortSelector.createGroupRPCServerInputPort("" + RELAYER_PORT, RELAYER_NAME);
    Relayer relayer = new ARelayer(serverInputPort);
    serverInputPort.register(Relayer.class, relayer);
    serverInputPort.register(RELAYER_NAME, relayer);
    serverInputPort.connect();
    ServerPortDescription serverPortDescription = new AServerPortDescription("localhost", "" + RELAYER_PORT, RELAYER_NAME);
    DuplexRPCClientInputPort sessionServerClientPort = DuplexRPCInputPortSelector.createDuplexRPCClientInputPort("localhost", "" + ADelayingSessionsServerLauncher.SESSION_SERVER_PORT, ADelayingSessionsServerLauncher.SESSION_SERVER_NAME, RELAYER_NAME);
    RelayerSupportingSessionServer sessionsServer = (RelayerSupportingSessionServer) DirectedRPCProxyGenerator.generateRPCProxy(sessionServerClientPort, null, RelayerSupportingSessionServer.class, null);
    sessionServerClientPort.connect();
    sessionsServer.setRelayerDescripton(serverPortDescription);
}
Also used : ServerPortDescription(port.sessionserver.ServerPortDescription) AServerPortDescription(port.sessionserver.AServerPortDescription) RelayerSupportingSessionServer(port.sessionserver.relay.RelayerSupportingSessionServer) DuplexRPCClientInputPort(inputport.rpc.duplex.DuplexRPCClientInputPort) ARelayer(port.relay.ARelayer) Relayer(port.relay.Relayer) AServerPortDescription(port.sessionserver.AServerPortDescription) ARelayer(port.relay.ARelayer) GroupRPCServerInputPort(inputport.rpc.group.GroupRPCServerInputPort)

Example 5 with AServerPortDescription

use of port.sessionserver.AServerPortDescription in project GIPC by pdewan.

the class ASessionServerRelayerPortFactory method createRelayerPort.

public GroupRPCServerInputPort createRelayerPort(String aRelayerServerId, String aRelayerServerName, DuplexRPCClientInputPort aSessionServerClientPort, String aSessionName) {
    GroupRPCServerInputPort retVal = createRelayerPort(aRelayerServerId, aRelayerServerName);
    String myHostName = "localhost";
    try {
        myHostName = InetAddress.getLocalHost().getHostName();
    } catch (Exception e) {
        e.printStackTrace();
    }
    ServerPortDescription serverPortDescription = new AServerPortDescription(myHostName, aRelayerServerId, aRelayerServerName);
    RelayerSupportingSessionServer sessionsServer = (RelayerSupportingSessionServer) DirectedRPCProxyGenerator.generateRPCProxy(aSessionServerClientPort, null, ARelayerSupportingSessionServer.class, aSessionServerClientPort.getLogicalRemoteEndPoint());
    aSessionServerClientPort.addConnectionListener(new ASessionServerToRelayerConnectionListener(aSessionServerClientPort, sessionsServer, serverPortDescription, aSessionName));
    aSessionServerClientPort.connect();
    return retVal;
}
Also used : ServerPortDescription(port.sessionserver.ServerPortDescription) AServerPortDescription(port.sessionserver.AServerPortDescription) AServerPortDescription(port.sessionserver.AServerPortDescription) GroupRPCServerInputPort(inputport.rpc.group.GroupRPCServerInputPort)

Aggregations

AServerPortDescription (port.sessionserver.AServerPortDescription)12 ServerPortDescription (port.sessionserver.ServerPortDescription)9 GroupRPCServerInputPort (inputport.rpc.group.GroupRPCServerInputPort)6 DuplexRPCClientInputPort (inputport.rpc.duplex.DuplexRPCClientInputPort)3 RelayerSupportingSessionServer (port.sessionserver.relay.RelayerSupportingSessionServer)3 ARelayer (port.relay.ARelayer)2 Relayer (port.relay.Relayer)2 APrintingSessionObserver (port.sessionserver.example.APrintingSessionObserver)2 DuplexRPCServerInputPort (inputport.rpc.duplex.DuplexRPCServerInputPort)1 GenericRelayingCollaborativeFrostyModel (port.relay.mvc.example.GenericRelayingCollaborativeFrostyModel)1 JoinInfo (port.sessionserver.JoinInfo)1 SessionObserver (port.sessionserver.SessionObserver)1 SessionServer (port.sessionserver.SessionServer)1 ARelayerSupportingSessionServer (port.sessionserver.relay.ARelayerSupportingSessionServer)1 ARelayingSession (port.sessionserver.relay.ARelayingSession)1 RelayingSession (port.sessionserver.relay.RelayingSession)1 LatecomerSessionServer (port.sessionserver.relay.late.LatecomerSessionServer)1 Adder (sessionport.rpc.duplex.relayed.example.Adder)1 AnAdder (sessionport.rpc.duplex.relayed.example.AnAdder)1