Consumer<com.eas.server.Session> withPlatypusSession = (com.eas.server.Session aSession) -> { Scripts.LocalContext context = new Scripts.LocalContext(platypusPrincipal(handshake, websocketSession), aSession); aSession.getSpace().process(context, () -> {
Scripts.LocalContext context = new Scripts.LocalContext(aHttpRequest, aHttpResponse, httpRequestPrincipal(aHttpRequest), aPlatypusSession); aPlatypusSession.getSpace().process(context, () -> { handler.handle(aPlatypusSession, (Response resp) -> {
Scripts.LocalContext context = new Scripts.LocalContext(session.getPrincipal(), session); session.getSpace().process(context, () -> { handler.handle(session, (Response aResponse) -> { if (session != null) { ioSession.setAttribute(SESSION_ID, session.getId()); Scripts.LocalContext context = new Scripts.LocalContext(session.getPrincipal(), session); session.getSpace().process(context, () -> { handler.handle(session, (Response aResponse) -> {
targetSpace = targetSession.getSpace(); Scripts.LocalContext targetContext = new Scripts.LocalContext(callingContext.getRequest(), callingContext.getResponse(), callingContext.getPrincipal(), callingContext.getSession()); targetSpace.process(targetContext, () -> { assert Scripts.getSpace() == targetSpace;
@Override public Object received(Packet aPacket) throws Exception { Session session = serverCore.getSessionManager().getSystemSession(); Scripts.LocalContext context = new Scripts.LocalContext(session.getPrincipal(), session); session.getSpace().process(context, () -> { serverCore.executeMethod(moduleName, RECIEVER_METHOD_NAME, new Object[]{aPacket}, true, (Object result) -> { if (result != null) { assert result instanceof String; assert sender != null; sender.send(aPacket, (String) result); } }, (Exception ex) -> { Logger.getLogger(PositioningPacketReciever.class.getName()).log(Level.WARNING, null, ex); }); }); return null; } }