Search in sources :

Example 1 with ARelayingSession

use of port.sessionserver.relay.ARelayingSession 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)

Aggregations

AServerPortDescription (port.sessionserver.AServerPortDescription)1 ServerPortDescription (port.sessionserver.ServerPortDescription)1 ARelayingSession (port.sessionserver.relay.ARelayingSession)1 RelayingSession (port.sessionserver.relay.RelayingSession)1