public final class LoginManager extends Object
Modifier and Type | Method and Description |
---|---|
static LoginManager |
getInstance()
Gets an instance of the
LoginManager (one per VM). |
void |
login(String cacheName)
Performs a login for a cache specified by
cacheName using the default authorization method. |
void |
login(String cacheName,
LoginModule loginModule)
Performs a log in for a cache specified by
cacheName with a custom authorization method. |
void |
logout(String cacheName,
LogoutScope scope)
Performs a logout for a cache specified by
cacheName . |
public static LoginManager getInstance()
LoginManager
(one per VM).LoginManager
instancepublic void login(String cacheName, LoginModule loginModule) throws NamedCacheException
cacheName
with a custom authorization method.
Provided login module is used to generate credentials.cacheName
- the name of the cache to log in tologinModule
- a custom login module to generate credentialsNamedCacheSecurityException
- if the credentials were rejected by the serverNamedCacheException
- if an unexpected error happenedpublic void login(String cacheName) throws NamedCacheException
cacheName
using the default authorization method.
Credentials are generated from system user name.cacheName
- the name of the cache to log in toNamedCacheSecurityException
- if the credentials were rejected by the serverNamedCacheException
- if an unexpected error occurredpublic void logout(String cacheName, LogoutScope scope) throws NamedCacheException
cacheName
. If the client is not logged in, an exception will be thrown.
There are two types of logout: store wide and local. If local, only the client this method was called on is logged out.
If store wide, all clients logged in to the cache cacheName
across SOSS store are logged out.
If this client is not logged in this method will return without performing any server calls.cacheName
- the name of the cache to log out fromscope
- enum value for type of logout(local or store wide)NamedCacheSecurityException
- if nobody was logged inNamedCacheException
- if an unexpected error happenedCopyright (C) 2007-2014 ScaleOut Software, Inc.