public class PassthruServers extends Object
Contains a list of one or more servers that are used for passthru authentication. The status of the servers is tracked so that offline servers are not used but periodically monitored so that they can be returned to the online list of servers.
The server list may be initialized from a list of server names or addresses, or by specifying a domain name in which case the primary and backup domain controllers will be used.
Constructor and Description |
---|
PassthruServers()
Default constructor
|
PassthruServers(int checkInterval)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
protected PassthruServerDetails |
getAuthenticationServer()
Return the details of an online server to use for authentication
|
protected PassthruServerDetails |
getAuthenticationServer(String clientDomain)
Return the details of an online server to use for authentication of the specified client
domain
|
int |
getConnectionTimeout()
Return the connection timeout, in milliseconds
|
String |
getDomain()
Return the domain name
|
boolean |
getNullDomainUseAnyServer()
Check if a null domain should use any available passthru server
|
int |
getOfflineServerCount()
Return the count of offline authentication servers
|
int |
getOnlineServerCount()
Return the count of online authentication servers
|
int |
getTotalServerCount()
Return the total count of online and offline servers
|
boolean |
hasDebug()
Check if debug output is enabled
|
boolean |
hasOnlineServers()
Determine if there are online servers
|
boolean |
isDomainAuthentication()
Determine if the authentication servers are domain controllers
|
AuthenticateSession |
openSession()
Open a new session to an authentication server
|
AuthenticateSession |
openSession(boolean useExtSec,
String clientDomain)
Open a new session to an authentication server
|
protected void |
serverOffline(PassthruServerDetails server)
Move a server from the list of online servers to the offline list
|
protected void |
serverOnline(PassthruServerDetails server)
Move a server from the list of offline servers to the online list
|
void |
setConnectionTimeout(int tmo)
Set the session connect timeout value, in milliseconds
|
void |
setDebug(boolean dbg)
Enable/disbale debug output
|
void |
setDomain(String domain)
Set the domain to use for passthru authentication
|
void |
setNullDomainUseAnyServer(boolean nullDomain)
Set the null domain to use any available server option
|
void |
setOfflineCheckInterval(long interval)
Set the offline check interval, in seconds
|
void |
setServerList(String servers)
Set the list of servers to use for passthru authentication using a comma delimeted list
of server names/addresses
|
void |
shutdown()
Shutdown passthru authentication
|
String |
toString()
Return the passthru server details as a string
|
public PassthruServers()
public PassthruServers(int checkInterval)
checkInterval
- In secondspublic final int getOnlineServerCount()
public final int getOfflineServerCount()
public final int getTotalServerCount()
public final boolean hasOnlineServers()
public final int getConnectionTimeout()
public final boolean isDomainAuthentication()
public final String getDomain()
public final boolean hasDebug()
public final boolean getNullDomainUseAnyServer()
public final AuthenticateSession openSession()
public final AuthenticateSession openSession(boolean useExtSec, String clientDomain)
useExtSec
- booleanclientDomain
- Stringprotected PassthruServerDetails getAuthenticationServer()
protected PassthruServerDetails getAuthenticationServer(String clientDomain)
clientDomain
- Stringprotected final void serverOffline(PassthruServerDetails server)
server
- PassthruServerDetailsprotected final void serverOnline(PassthruServerDetails server)
server
- PassthruServerDetailspublic final void setConnectionTimeout(int tmo)
tmo
- intpublic final void setOfflineCheckInterval(long interval)
interval
- longpublic final void setServerList(String servers)
servers
- Stringpublic final void setDomain(String domain) throws IOException
domain
- StringIOException
public final void setNullDomainUseAnyServer(boolean nullDomain)
nullDomain
- booleanpublic final void setDebug(boolean dbg)
dbg
- booleanpublic final void shutdown()
Copyright © 2005–2017 Alfresco Software. All rights reserved.