Package net.handle.hdllib
Class ClientSessionTracker
java.lang.Object
net.handle.hdllib.ClientSessionTracker
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 Summary
ConstructorsConstructorDescriptionCreates a new ClientSessionTracker object that has no sessionSetupInfo.ClientSessionTracker
(SessionSetupInfo setupInfo) -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of sessions.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.getSession
(ServerInfo server, AuthenticationInfo authInfo) Gets the session that is associated with the given server and authentication information.Gets the session setup information for this session tracker.void
putSession
(ClientSideSessionInfo session, ServerInfo server, AuthenticationInfo authInfo) Stores the given session object and associates it with the given server and authInfo objects.void
removeSession
(ClientSideSessionInfo session) Remove all references to the given session from this session tracker.static boolean
sessionOptionChanged
(ClientSideSessionInfo csinfo, SessionSetupInfo option) void
setSessionSetupInfo
(SessionSetupInfo setupInfo) Sets the session setup information for this session tracker.
-
Constructor Details
-
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
-
-
Method Details
-
setSessionSetupInfo
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
Gets the session setup information for this session tracker. -
getSession
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
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. -
getAllSessions
Returns a list of sessions. -
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
Remove all references to the given session from this session tracker. -
sessionOptionChanged
-