Class ClientSessionTracker


  • public class ClientSessionTracker
    extends java.lang.Object
    Instances of ClientSessionTracker are meant to maintain a set of ClientSideSessionInfo objects for different servers. When one of the servers in the list are contacted, the existing session information associated with that server is used to authenticate. This object also keeps track of the SessionSetupInfo in case the resolver needs to create a new session.
    • Constructor Detail

      • ClientSessionTracker

        public ClientSessionTracker()
        Creates a new ClientSessionTracker object that has no sessionSetupInfo. With no sessionSetupInfo, requests that use this session tracker will not cause new sessions to be initiated, but existing sessions will be used.
      • ClientSessionTracker

        public ClientSessionTracker​(SessionSetupInfo setupInfo)
    • Method Detail

      • setSessionSetupInfo

        public void setSessionSetupInfo​(SessionSetupInfo setupInfo)
        Sets the session setup information for this session tracker. This makes it so that requests that use this session tracker will cause new sessions to be created and stored here.
      • getSessionSetupInfo

        public SessionSetupInfo getSessionSetupInfo()
        Gets the session setup information for this session tracker.
      • getSession

        public ClientSideSessionInfo getSession​(ServerInfo server,
                                                AuthenticationInfo authInfo)
        Gets the session that is associated with the given server and authentication information. If there is no session with the given server and authentication information then this returns null. If the given authInfo object is null then the session is assumed to be anonymous.
      • getAndRemoveSession

        public ClientSideSessionInfo getAndRemoveSession​(ServerInfo server,
                                                         AuthenticationInfo authInfo)
        Gets the session that is associated with the given server and authentication information, and removes it so that no other thread can use it. If there is no session with the given server and authentication information then this returns null. If the given authInfo object is null then the session is assumed to be anonymous.
      • putSession

        public void putSession​(ClientSideSessionInfo session,
                               ServerInfo server,
                               AuthenticationInfo authInfo)
        Stores the given session object and associates it with the given server and authInfo objects. If the authInfo object is null then the session is assumed to be anonymous.
      • removeSession

        public void removeSession​(ClientSideSessionInfo session)
        Remove all references to the given session from this session tracker.