public Session createSession(SessionContext initData) {
        if (initData != null) {
            String host = initData.getHost();
            if (host != null) {
                return new SimpleSession(host);
            }
        }
        return new SimpleSession();
    }
Creates a new {@link SimpleSession SimpleSession} instance retaining the context's
{@link SessionContext#getHost() host} if one can be found.

@param initData the initialization data to be used during {@link Session} creation.
@return a new {@link SimpleSession SimpleSession} instance
core/src/main/java/org/apache/shiro/session/mgt/SimpleSessionFactory.java