Search in sources :

Example 11 with ServerPortDescription

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

the class ARelayerCreator method registerWithSessionsServer.

public static void registerWithSessionsServer(String relayerId, String relayerName, String sessionsServerHost, String sessionsServerId, String sessionsServerName) {
    ServerPortDescription serverPortDescription = new AServerPortDescription("localhost", relayerId, relayerName);
    DuplexRPCClientInputPort sessionServerClientPort = DuplexRPCInputPortSelector.createDuplexRPCClientInputPort(sessionsServerHost, sessionsServerId, sessionsServerName, relayerName);
    RelayerSupportingSessionServer sessionsServer = (RelayerSupportingSessionServer) DirectedRPCProxyGenerator.generateRPCProxy(sessionServerClientPort, null, RelayerSupportingSessionServer.class, sessionsServerName);
    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) AServerPortDescription(port.sessionserver.AServerPortDescription)

Example 12 with ServerPortDescription

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

the class ABufferDuplexStaticSessionPortFullP2P method createServerPort.

// this is the part that multiserver port does not have to do. Hence multiserver port cannot be subclass of static port
protected void createServerPort() {
    try {
        ServerPortDescription aServerPortDescription = new AServerPortDescription(InetAddress.getLocalHost().getHostName(), id, name);
        Tracer.info(this, "Asking connections manager to create server port for P2P connections");
        bufferStaticSessionConnectionManager.createServerInputPort(aServerPortDescription);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
Also used : AServerPortDescription(port.sessionserver.AServerPortDescription) ServerPortDescription(port.sessionserver.ServerPortDescription) AServerPortDescription(port.sessionserver.AServerPortDescription)

Example 13 with ServerPortDescription

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

the class CopyOfARelayingSessionsServer method createSession.

@Override
protected Session createSession(String aSessionName) {
    try {
        ServerPortDescription serverPortDescription = new AServerPortDescription(InetAddress.getLocalHost().getHostName(), "" + nextServerId, aSessionName);
        nextServerId++;
        DuplexServerInputPort<Object> port = DuplexObjectInputPortSelector.createDuplexServerInputPort(serverPortDescription.getID(), serverPortDescription.getName());
        port.addConnectionListener(this);
        port.connect();
        // wait();
        RelayingSession session = new ARelayingSession();
        // nameToSession.put(aSessionName, session);
        session.setRelayingPort(port);
        session.setServerPortDescription(serverPortDescription);
        return session;
    } catch (Exception e) {
        e.printStackTrace();
        return null;
    }
}
Also used : AServerPortDescription(port.sessionserver.AServerPortDescription) ServerPortDescription(port.sessionserver.ServerPortDescription) RelayingSession(port.sessionserver.relay.RelayingSession) ARelayingSession(port.sessionserver.relay.ARelayingSession) AServerPortDescription(port.sessionserver.AServerPortDescription) ARelayingSession(port.sessionserver.relay.ARelayingSession)

Example 14 with ServerPortDescription

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

the class AThreeDepPortClientLauncher method communicateWithSessionServer.

protected void communicateWithSessionServer() {
    ServerPortDescription relayerPortDescription = sessionServerProxy.getRelayerDescripton(sessionName);
    JoinInfo joinInfo = joinSessionServer();
    ServerPortDescription mvcServerPortDescription = null;
    List<SessionParticipantDescription> servers = joinInfo.getServers();
    if (servers.size() > 0) {
        mvcServerPortDescription = servers.get(0);
    } else {
        mvcServerHasNotJoined();
    }
    processMemberJoinInfo(joinInfo);
    chainConnectListeners(relayerPortDescription, mvcServerPortDescription);
}
Also used : JoinInfo(port.sessionserver.JoinInfo) ServerPortDescription(port.sessionserver.ServerPortDescription) AServerPortDescription(port.sessionserver.AServerPortDescription) SessionParticipantDescription(port.sessionserver.SessionParticipantDescription)

Aggregations

ServerPortDescription (port.sessionserver.ServerPortDescription)14 AServerPortDescription (port.sessionserver.AServerPortDescription)11 GroupRPCServerInputPort (inputport.rpc.group.GroupRPCServerInputPort)7 RelayerSupportingSessionServer (port.sessionserver.relay.RelayerSupportingSessionServer)4 DuplexRPCClientInputPort (inputport.rpc.duplex.DuplexRPCClientInputPort)3 ARelayer (port.relay.ARelayer)2 Relayer (port.relay.Relayer)2 JoinInfo (port.sessionserver.JoinInfo)2 SessionParticipantDescription (port.sessionserver.SessionParticipantDescription)2 ARelayerSupportingSessionServer (port.sessionserver.relay.ARelayerSupportingSessionServer)2 ConnectionListener (inputport.ConnectionListener)1 DuplexRPCServerInputPort (inputport.rpc.duplex.DuplexRPCServerInputPort)1 SessionObserver (port.sessionserver.SessionObserver)1 SessionServer (port.sessionserver.SessionServer)1 ARelayingSession (port.sessionserver.relay.ARelayingSession)1 RelayingSession (port.sessionserver.relay.RelayingSession)1 Adder (sessionport.rpc.duplex.relayed.example.Adder)1 AnAdder (sessionport.rpc.duplex.relayed.example.AnAdder)1 AConnectionEvent (util.trace.port.AConnectionEvent)1