Class ImmutableProxiedSession

    • Constructor Detail

      • ImmutableProxiedSession

        public ImmutableProxiedSession​(Session target)
        Constructs a new instance of this class proxying the specified Session.
        Parameters:
        target - the target Session to proxy.
    • Method Detail

      • throwImmutableException

        protected void throwImmutableException()
                                        throws InvalidSessionException
        Simply throws an InvalidSessionException indicating that this proxy is immutable. Used only in the Session's 'write' methods documented in the top class-level JavaDoc.
        Throws:
        InvalidSessionException - in all cases - used by the Session 'write' method implementations.
      • setTimeout

        public void setTimeout​(long maxIdleTimeInMillis)
                        throws InvalidSessionException
        Immediately throws an InvalidSessionException in all cases because this proxy is immutable.
        Specified by:
        setTimeout in interface Session
        Overrides:
        setTimeout in class ProxiedSession
        Parameters:
        maxIdleTimeInMillis - the time in milliseconds that the session may remain idle before expiring.
        Throws:
        InvalidSessionException - if the session has been stopped or expired prior to calling this method.
      • setAttribute

        public void setAttribute​( key,
                                  value)
                          throws InvalidSessionException
        Immediately throws an InvalidSessionException in all cases because this proxy is immutable.
        Specified by:
        setAttribute in interface Session
        Overrides:
        setAttribute in class ProxiedSession
        Parameters:
        key - the name under which the value object will be bound in this session
        value - the object to bind in this session.
        Throws:
        InvalidSessionException - if this session has stopped or expired prior to calling this method.
      • removeAttribute

        public  removeAttribute​( key)
                               throws InvalidSessionException
        Immediately throws an InvalidSessionException in all cases because this proxy is immutable.
        Specified by:
        removeAttribute in interface Session
        Overrides:
        removeAttribute in class ProxiedSession
        Parameters:
        key - the name uniquely identifying the object to remove
        Returns:
        the object removed or null if there was no object bound under the name key.
        Throws:
        InvalidSessionException - if this session has stopped or expired prior to calling this method.