Build 1.0_r1(from source)

org.apache.http.impl.client
Class BasicCredentialsProvider

java.lang.Object
  extended by org.apache.http.impl.client.BasicCredentialsProvider
All Implemented Interfaces:
CredentialsProvider

public class BasicCredentialsProvider
extends Object
implements CredentialsProvider

Default implementation of CredentialsProvider

Since:
4.0

Constructor Summary
BasicCredentialsProvider()
          Default constructor.
 
Method Summary
 void clear()
          Clears all credentials.
 Credentials getCredentials(AuthScope authscope)
          Get the credentials for the given authentication scope.
 void setCredentials(AuthScope authscope, Credentials credentials)
          Sets the credentials for the given authentication scope.
 String toString()
          Returns a string containing a concise, human-readable description of the receiver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicCredentialsProvider

public BasicCredentialsProvider()
Default constructor.

Method Detail

setCredentials

public void setCredentials(AuthScope authscope,
                           Credentials credentials)
Sets the credentials for the given authentication scope. Any previous credentials for the given scope will be overwritten.

Specified by:
setCredentials in interface CredentialsProvider
Parameters:
authscope - the authentication scope
credentials - the authentication credentials for the given scope.
See Also:
getCredentials(AuthScope)

getCredentials

public Credentials getCredentials(AuthScope authscope)
Get the credentials for the given authentication scope.

Specified by:
getCredentials in interface CredentialsProvider
Parameters:
authscope - the authentication scope
Returns:
the credentials
See Also:
setCredentials(AuthScope, Credentials)

toString

public String toString()
Description copied from class: Object
Returns a string containing a concise, human-readable description of the receiver.

Overrides:
toString in class Object
Returns:
String a printable representation for the receiver.

clear

public void clear()
Clears all credentials.

Specified by:
clear in interface CredentialsProvider

Build 1.0_r1(from source)

Please submit a feedback, bug or feature