|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jersey.client.apache.config.ApacheHttpClientState
public class ApacheHttpClientState
An encapsulation of the Apache HttpState
that provides easier
functionality for setting up credentials and proxy credentials.
Constructor Summary | |
---|---|
ApacheHttpClientState()
Create a new instance with a default instance of an Apache HTTP state. |
|
ApacheHttpClientState(org.apache.commons.httpclient.HttpState state)
Create a new state instance with an Apacahe HTTP state instance. |
Method Summary | |
---|---|
void |
clearCredentials()
Clears all credentials. |
void |
clearProxyCredentials()
Clears all proxy credentials. |
org.apache.commons.httpclient.HttpState |
getHttpState()
Get the HTTP state. |
void |
setCredentials(String realm,
String host,
int port,
String usernamepassword)
Sets the credentials for the given authentication scope. |
void |
setCredentials(String realm,
String host,
int port,
String username,
String password)
Sets the credentials for the given authentication scope. |
void |
setCredentials(String realm,
String host,
int port,
String username,
String password,
String domain,
String thisHost)
Sets the credentials for the given authentication scope. |
void |
setProxyCredentials(String realm,
String host,
int port,
String usernamepassword)
Sets the proxy credentials for the given authentication scope. |
void |
setProxyCredentials(String realm,
String host,
int port,
String username,
String password)
Sets the proxy credentials for the given authentication scope. |
void |
setProxyCredentials(String realm,
String host,
int port,
String username,
String password,
String domain,
String thisHost)
Sets the proxy credentials for the given authentication scope. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ApacheHttpClientState()
public ApacheHttpClientState(org.apache.commons.httpclient.HttpState state)
state
- the Apache HTTP state.Method Detail |
---|
public void setCredentials(String realm, String host, int port, String usernamepassword)
realm
- The authentication realm. The null realm
signifies default credentials for the given host, which should
be used when no credentials have been explicitly supplied for
the challenging realm.host
- The host the realm belongs to. The null host
signifies default credentials which should be used when no
credentials have been explicitly supplied for the challenging
host.port
- The port the realm belongs to. A negitive port
signifies the credentials are applicaple to any port when no
credentials have been explicitly supplied for the challenging
port.usernamepassword
- The username:password formed string.public void setCredentials(String realm, String host, int port, String username, String password)
realm
- The authentication realm. The null realm
signifies default credentials for the given host, which should
be used when no credentials have been explicitly supplied for
the challenging realm.host
- The host the realm belongs to. The null host
signifies default credentials which should be used when no
credentials have been explicitly supplied for the challenging
host.port
- The port the realm belongs to. A negitive port
signifies the credentials are applicaple to any port when no
credentials have been explicitly supplied for the challenging
port.username
- The usernamepassword
- The passwordpublic void setCredentials(String realm, String host, int port, String username, String password, String domain, String thisHost)
realm
- The authentication realm. The null realm
signifies default credentials for the given host, which should
be used when no credentials have been explicitly supplied for
the challenging realm.host
- The host the realm belongs to. The null host
signifies default credentials which should be used when no
credentials have been explicitly supplied for the challenging
host.port
- The port the realm belongs to. A negitive port
signifies the credentials are applicaple to any port when no
credentials have been explicitly supplied for the challenging
port.username
- The username, this should not include the
domain to authenticate with. For example: "user" is correct
wheareas "DOMAIN\\user" is not.password
- The passwordthisHost
- The host the authentication requiest is originating
from. Essentially, the computer name for this machine.domain
- The domain to authentice with.public void setProxyCredentials(String realm, String host, int port, String usernamepassword)
realm
- The authentication realm. The null realm
signifies default credentials for the given host, which should
be used when no credentials have been explicitly supplied for
the challenging realm.host
- The host the realm belongs to. The null host
signifies default credentials which should be used when no
credentials have been explicitly supplied for the challenging
host.port
- The port the realm belongs to. A negitive port
signifies the credentials are applicaple to any port when no
credentials have been explicitly supplied for the challenging
port.usernamepassword
- The username:password formed string.public void setProxyCredentials(String realm, String host, int port, String username, String password)
realm
- The authentication realm. The null realm
signifies default credentials for the given host, which should
be used when no credentials have been explicitly supplied for
the challenging realm.host
- The host the realm belongs to. The null host
signifies default credentials which should be used when no
credentials have been explicitly supplied for the challenging
host.port
- The port the realm belongs to. A negitive port
signifies the credentials are applicaple to any port when no
credentials have been explicitly supplied for the challenging
port.username
- The usernamepassword
- The passwordpublic void setProxyCredentials(String realm, String host, int port, String username, String password, String domain, String thisHost)
realm
- The authentication realm. The null realm
signifies default credentials for the given host, which should
be used when no credentials have been explicitly supplied for
the challenging realm.host
- The host the realm belongs to. The null host
signifies default credentials which should be used when no
credentials have been explicitly supplied for the challenging
host.port
- The port the realm belongs to. A negitive port
signifies the credentials are applicaple to any port when no
credentials have been explicitly supplied for the challenging
port.username
- The username, this should not include the
domain to authenticate with. For example: "user" is correct
wheareas "DOMAIN\\user" is not.password
- The passwordthisHost
- The host the authentication requiest is originating
from. Essentially, the computer name for this machine.domain
- The domain to authentice with.public void clearCredentials()
public void clearProxyCredentials()
public org.apache.commons.httpclient.HttpState getHttpState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |