protected void assignSessionId(Session session, Serializable sessionId) {
        ((SimpleSession) session).setId(sessionId);
    }
Utility method available to subclasses that wish to
assign a generated session ID to the session instance directly.  This method is not used by the
{@code AbstractSessionDAO} implementation directly, but it is provided so subclasses don't
need to know the {@code Session} implementation if they don't need to.
<p/>
This default implementation casts the argument to a {@link SimpleSession}, Shiro's default EIS implementation.

@param session   the session instance to which the sessionId will be applied
@param sessionId the id to assign to the specified session instance.
core/src/main/java/org/apache/shiro/session/mgt/eis/AbstractSessionDAO.java