public void setAttribute(Object key, Object value) {
        if (value == null) {
            removeAttribute(key);
        } else {
            getAttributesLazy().put(key, value);
        }
    }
Determines if this session is expired.

@return true if the specified session has expired, false otherwise.
core/src/main/java/org/apache/shiro/session/mgt/SimpleSession.java