@Override public String getSessionId() { return obtainSession().getId(); }
/** * Register the given callback as to be executed after session termination. * <p>Note: The callback object should be serializable in order to survive * web app restarts. * @param name the name of the attribute to register the callback for * @param callback the callback to be executed for destruction */ protected void registerSessionDestructionCallback(String name, Runnable callback) { HttpSession session = obtainSession(); session.setAttribute(DESTRUCTION_CALLBACK_NAME_PREFIX + name, new DestructionCallbackBindingListener(callback)); }
@Override public Object getSessionMutex() { return WebUtils.getSessionMutex(obtainSession()); }
@Override public String getSessionId() { return obtainSession().getId(); }
@Override public void setAttribute(String name, Object value, int scope) { if (scope == SCOPE_REQUEST) { if (!isRequestActive()) { throw new IllegalStateException( "Cannot set request attribute - request is not active anymore!"); } this.request.setAttribute(name, value); } else { HttpSession session = obtainSession(); this.sessionAttributesToUpdate.remove(name); session.setAttribute(name, value); } }
/** * Register the given callback as to be executed after session termination. * <p>Note: The callback object should be serializable in order to survive * web app restarts. * @param name the name of the attribute to register the callback for * @param callback the callback to be executed for destruction */ protected void registerSessionDestructionCallback(String name, Runnable callback) { HttpSession session = obtainSession(); session.setAttribute(DESTRUCTION_CALLBACK_NAME_PREFIX + name, new DestructionCallbackBindingListener(callback)); }
@Override public Object getSessionMutex() { return WebUtils.getSessionMutex(obtainSession()); }
@Override public void setAttribute(String name, Object value, int scope) { if (scope == SCOPE_REQUEST) { if (!isRequestActive()) { throw new IllegalStateException( "Cannot set request attribute - request is not active anymore!"); } this.request.setAttribute(name, value); } else { HttpSession session = obtainSession(); this.sessionAttributesToUpdate.remove(name); session.setAttribute(name, value); } }
@Override public String getSessionId() { return obtainSession().getId(); }
@Override public String getSessionId() { return obtainSession().getId(); }
/** * Register the given callback as to be executed after session termination. * <p>Note: The callback object should be serializable in order to survive * web app restarts. * @param name the name of the attribute to register the callback for * @param callback the callback to be executed for destruction */ protected void registerSessionDestructionCallback(String name, Runnable callback) { HttpSession session = obtainSession(); session.setAttribute(DESTRUCTION_CALLBACK_NAME_PREFIX + name, new DestructionCallbackBindingListener(callback)); }
@Override public Object getSessionMutex() { return WebUtils.getSessionMutex(obtainSession()); }
/** * Register the given callback as to be executed after session termination. * <p>Note: The callback object should be serializable in order to survive * web app restarts. * @param name the name of the attribute to register the callback for * @param callback the callback to be executed for destruction */ protected void registerSessionDestructionCallback(String name, Runnable callback) { HttpSession session = obtainSession(); session.setAttribute(DESTRUCTION_CALLBACK_NAME_PREFIX + name, new DestructionCallbackBindingListener(callback)); }
@Override public void setAttribute(String name, Object value, int scope) { if (scope == SCOPE_REQUEST) { if (!isRequestActive()) { throw new IllegalStateException( "Cannot set request attribute - request is not active anymore!"); } this.request.setAttribute(name, value); } else { HttpSession session = obtainSession(); this.sessionAttributesToUpdate.remove(name); session.setAttribute(name, value); } }
@Override public Object getSessionMutex() { return WebUtils.getSessionMutex(obtainSession()); }
@Override public void setAttribute(String name, Object value, int scope) { if (scope == SCOPE_REQUEST) { if (!isRequestActive()) { throw new IllegalStateException( "Cannot set request attribute - request is not active anymore!"); } this.request.setAttribute(name, value); } else { HttpSession session = obtainSession(); this.sessionAttributesToUpdate.remove(name); session.setAttribute(name, value); } }