Interface SessionFactory<T>


  • public interface SessionFactory<T>
    A session (data object) factory.
    Since:
    1.5.0
    Version:
    $Id: SessionFactory.java 16154 2012-07-14 16:34:05Z colin $
    Author:
    tlerios@marketcetera.com
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T createSession​(StatelessClientContext context, String user, SessionId id)
      Creates a new session (data object), for a new session initiated with the given creation context and on behalf of the user with the given name, and assigned the given ID.
      void removedSession​(T session)
      Notifies the receiver that the session associated with the given session (data object) has been terminated.
    • Method Detail

      • createSession

        T createSession​(StatelessClientContext context,
                        String user,
                        SessionId id)
        Creates a new session (data object), for a new session initiated with the given creation context and on behalf of the user with the given name, and assigned the given ID.
        Parameters:
        context - The context.
        user - The user name.
        id - The session ID.
        Returns:
        The session (data object). It may be null.
      • removedSession

        void removedSession​(T session)
        Notifies the receiver that the session associated with the given session (data object) has been terminated. Note that, since the session (data object) associated with a SessionHolder can be modified during a session, the argument supplied to this method may not be the same object as returned from createSession(StatelessClientContext,String,SessionId) for the same session.
        Parameters:
        session - The session (data object).