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;
}
}
Aggregations