if (!session.isValid()) { if (getLogger().isDebugEnabled()) { getLogger().debug("Loaded session " + session.getId() + " is invalid");
private void swapOut( @Nonnull final StandardSession session ) { // implementation like the one in PersistentManagerBase.swapOut if (!session.isValid()) { return; } session.passivate(); removeInternal(session, true); session.recycle(); }
private void swapOut( @Nonnull final StandardSession session ) { // implementation like the one in PersistentManagerBase.swapOut if (!session.isValid()) { return; } session.passivate(); removeInternal( session, true ); session.recycle(); }
private void swapOut( @Nonnull final StandardSession session ) { // implementation like the one in PersistentManagerBase.swapOut if (!session.isValid()) { return; } session.passivate(); removeInternal(session, true); session.recycle(); }
private void swapOut( @Nonnull final StandardSession session ) { // implementation like the one in PersistentManagerBase.swapOut if (!session.isValid()) { return; } session.passivate(); remove( session, false ); session.recycle(); }
protected void evaluateIfValid() { /* * If this session has expired or is in the process of expiring or * will never expire, return */ if (!this.isValid || expiring || maxInactiveInterval < 0) return; isValid(); }
protected void evaluateIfValid() { /* * If this session has expired or is in the process of expiring or * will never expire, return */ if (!this.isValid || expiring || maxInactiveInterval < 0) return; isValid(); }
/** * Return the time when this session was created, in milliseconds since * midnight, January 1, 1970 GMT. * * @exception IllegalStateException if this method is called on an * invalidated session */ public long getCreationTime() { if (!isValid()) throw new IllegalStateException ("getCreationTime: " + rb.getString(LogFacade.SESSION_INVALIDATED_EXCEPTION)); return (this.creationTime); }
/** * Return the last time the client sent a request associated with this * session, as the number of milliseconds since midnight, January 1, 1970 * GMT. Actions that your application takes, such as getting or setting * a value associated with the session, do not affect the access time. */ public long getLastAccessedTime() { if ( !isValid() ) { throw new IllegalStateException ("getLastAccessedTime: " + rb.getString(LogFacade.SESSION_INVALIDATED_EXCEPTION)); } return (this.lastAccessedTime); }
/** * Return the object bound with the specified name in this session, or * <code>null</code> if no object is bound with that name. * * @param name Name of the attribute to be returned * * @exception IllegalStateException if this method is called on an * invalidated session */ public Object getAttribute(String name) { if (!isValid()) throw new IllegalStateException ("getAttribute: " + rb.getString(LogFacade.SESSION_INVALIDATED_EXCEPTION)); if (name == null) return null; return (attributes.get(name)); }
/** * Return the last time the client sent a request associated with this * session, as the number of milliseconds since midnight, January 1, 1970 * GMT. Actions that your application takes, such as getting or setting * a value associated with the session, do not affect the access time. */ public long getLastAccessedTime() { if ( !isValid() ) { throw new IllegalStateException (sm.getString("standardSession.getLastAccessedTime.ise")); } return (this.lastAccessedTime); }
/** * Return the time when this session was created, in milliseconds since * midnight, January 1, 1970 GMT. * * @exception IllegalStateException if this method is called on an * invalidated session */ public long getCreationTime() { if (!isValid()) throw new IllegalStateException (sm.getString("standardSession.getCreationTime.ise")); return (this.creationTime); }
/** * Return an <code>Enumeration</code> of <code>String</code> objects * containing the names of the objects bound to this session. * * @exception IllegalStateException if this method is called on an * invalidated session */ public Enumeration<String> getAttributeNames() { if (!isValid()) throw new IllegalStateException ("getAttributeNames: " + rb.getString(LogFacade.SESSION_INVALIDATED_EXCEPTION)); return (new Enumerator<String>(attributes.keySet(), true)); }
/** * Return the set of names of objects bound to this session. If there * are no such objects, a zero-length array is returned. * * @exception IllegalStateException if this method is called on an * invalidated session * * @deprecated As of Version 2.2, this method is replaced by * <code>getAttributeNames()</code> */ public String[] getValueNames() { if (!isValid()) throw new IllegalStateException ("getValueNames: " + rb.getString(LogFacade.SESSION_INVALIDATED_EXCEPTION)); return (keys()); }
/** * Return the object bound with the specified name in this session, or * <code>null</code> if no object is bound with that name. * * @param name Name of the attribute to be returned * * @exception IllegalStateException if this method is called on an * invalidated session */ public Object getAttribute(String name) { if (!isValid()) throw new IllegalStateException (sm.getString("standardSession.getAttribute.ise")); return (attributes.get(name)); }
/** * Return <code>true</code> if the client does not yet know about the * session, or if the client chooses not to join the session. For * example, if the server used only cookie-based sessions, and the client * has disabled the use of cookies, then a session would be new on each * request. * * @exception IllegalStateException if this method is called on an * invalidated session */ public boolean isNew() { if (!isValid()) throw new IllegalStateException (sm.getString("standardSession.isNew.ise")); return (this.isNew); }
/** * Return an <code>Enumeration</code> of <code>String</code> objects * containing the names of the objects bound to this session. * * @exception IllegalStateException if this method is called on an * invalidated session */ public Enumeration getAttributeNames() { if (!isValid()) throw new IllegalStateException (sm.getString("standardSession.getAttributeNames.ise")); return (new Enumerator(attributes.keySet(), true)); }
/** * Invalidates this session and unbinds any objects bound to it. * * @exception IllegalStateException if this method is called on * an invalidated session */ public void invalidate() { if (!isValid()) throw new IllegalStateException (sm.getString("standardSession.invalidate.ise")); // Cause this session to expire expire(); }
/** * Return the set of names of objects bound to this session. If there * are no such objects, a zero-length array is returned. * * @exception IllegalStateException if this method is called on an * invalidated session * * @deprecated As of Version 2.2, this method is replaced by * <code>getAttributeNames()</code> */ public String[] getValueNames() { if (!isValid()) throw new IllegalStateException (sm.getString("standardSession.getValueNames.ise")); return (keys()); }
private void swapOut( @Nonnull final StandardSession session ) { // implementation like the one in PersistentManagerBase.swapOut if (!session.isValid()) { return; } session.passivate(); removeInternal(session, true); session.recycle(); }