public class AccountManager extends java.lang.Object implements org.apache.http.client.CredentialsProvider, IOUtil.UserAccountManager
Constructor and Description |
---|
AccountManager(java.io.File stateDir)
constructor
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
_more_
|
org.apache.http.auth.Credentials |
getCredentials() |
org.apache.http.auth.Credentials |
getCredentials(org.apache.http.auth.AuthScope scope)
Do the authentication
|
org.apache.http.auth.Credentials |
getCredentialsnew(org.apache.http.auth.AuthScope scope)
_more_
|
static AccountManager |
getGlobalAccountManager()
Get the account manager
|
protected java.util.Hashtable<java.lang.String,UserInfo> |
getTable()
_more_
|
UserInfo |
getUserNamePassword(java.lang.String key,
java.lang.String label)
_more_
|
void |
removeUserNamePassword()
_more_
|
void |
setCredentials(org.apache.http.auth.AuthScope scope,
org.apache.http.auth.Credentials creds)
_more_
|
static void |
setGlobalAccountManager(AccountManager manager)
Set te global account manager.
|
protected void |
writeTable()
_more_
|
public AccountManager(java.io.File stateDir)
stateDir
- The directory to read/write state topublic void clear()
clear
in interface org.apache.http.client.CredentialsProvider
public static AccountManager getGlobalAccountManager()
public static void setGlobalAccountManager(AccountManager manager)
manager
- Instance of the global account managerpublic void setCredentials(org.apache.http.auth.AuthScope scope, org.apache.http.auth.Credentials creds)
setCredentials
in interface org.apache.http.client.CredentialsProvider
scope
- _more_creds
- public org.apache.http.auth.Credentials getCredentials(org.apache.http.auth.AuthScope scope)
getCredentials
in interface org.apache.http.client.CredentialsProvider
scope
- authscopepublic org.apache.http.auth.Credentials getCredentials()
public org.apache.http.auth.Credentials getCredentialsnew(org.apache.http.auth.AuthScope scope)
scope
- _more_public UserInfo getUserNamePassword(java.lang.String key, java.lang.String label)
getUserNamePassword
in interface IOUtil.UserAccountManager
key
- _more_label
- _more_public void removeUserNamePassword()
protected void writeTable()
protected java.util.Hashtable<java.lang.String,UserInfo> getTable()