org.nees.util.sessions
Class AuthenticatedSessionProvider
java.lang.Object
org.nees.util.sessions.SessionProvider
org.nees.util.sessions.AuthenticatedSessionProvider
- public class AuthenticatedSessionProvider
- extends SessionProvider
This class manages a session factory and provides a session when
asked for. If a provided session fails while executing commands
(because of a service becoming unavailable, or credentials
expiring, etc.) the provider will attempt to acquire a new session
from the factory. This relieves applications from having to worry
about sessions expiring.
Users of AuthenticatedSessionProvider should only cache provided sessions
one or two commands, then call getSession again.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AuthenticatedSessionProvider
public AuthenticatedSessionProvider(AuthenticatedSessionFactory sessionFactory)
- Parameters:
sessionFactory - the factory to use to create new sessions.
getSession
public Session getSession(AuthenticIdentity aId)
throws SessionUnavailableException
- Throws:
SessionUnavailableException