public AtmosphereResource resource() { return request.resource(); }
public AtmosphereResourceImpl resource() { return AtmosphereResourceImpl.class.cast(request.resource()); } }
public AtmosphereResourceImpl resource() { return AtmosphereResourceImpl.class.cast(request.resource()); } }
public RemoteEndpointImpl(AtmosphereRequest request, String body) { this.request = request; this.body = body; this.path = (String) request.getAttribute(FrameworkConfig.MAPPED_PATH); this.pathSegments = path.split("/"); this.resource = request.resource(); }
public AtmosphereResource.TRANSPORT transport() { return request.resource().transport(); }
private void _close(AtmosphereRequest request) { AtmosphereResourceImpl r = AtmosphereResourceImpl.class.cast(request.resource()); if (request != null && r != null) { AsynchronousProcessor.class.cast(r.getAtmosphereConfig().framework().getAsyncSupport()).endRequest(r, true); } }
private final void addContextValue(AtmosphereRequest request, String name, Object value) { if (request.resource().transport().equals(AtmosphereResource.TRANSPORT.WEBSOCKET)) { request.setAttribute(name, value); } else { request.getSession().setAttribute(name, value); } }
private final Object getContextValue(AtmosphereRequest request, String name) { if (request.resource().transport().equals(AtmosphereResource.TRANSPORT.WEBSOCKET)) { return request.getAttribute(name); } else { return request.getSession().getAttribute(name); } }
@Override public Action suspended(AtmosphereRequest request, AtmosphereResponse response) throws IOException, ServletException { Action a = super.suspended(request, response); if (framework.getAtmosphereConfig().isSupportSession()) { AtmosphereResource r = request.resource(); HttpSession s = request.getSession(true); if (s != null) { sessions.put(r.uuid(), request.getSession(true)); } } return a; }
@Override public Action suspended(AtmosphereRequest request, AtmosphereResponse response) throws IOException, ServletException { Action a = super.suspended(request, response); if (framework.getAtmosphereConfig().isSupportSession()) { AtmosphereResource r = request.resource(); HttpSession s = request.getSession(true); if (s != null) { sessions.put(r.uuid(), request.getSession(true)); } } return a; }