|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wink.client.handlers.AbstractAuthSecurityHandler org.apache.wink.client.handlers.ProxyAuthSecurityHandler
public class ProxyAuthSecurityHandler
SecurityHandler for a client to perform http proxy auth:
Usage:
ClientConfig config = new ClientConfig();
ProxyAuthSecurityHandler proxyAuthSecHandler = new ProxyAuthSecurityHandler();
proxyAuthSecHandler.setUserName("username");
proxyAuthSecHandler.setPassword("password");
config.handlers(proxyAuthSecurityHandler);
// create the rest client instance
RestClient client = new RestClient(config);
// create the resource instance to interact with Resource
resource = client.resource("http://localhost:8080/path/to/resource");
Field Summary |
---|
Fields inherited from class org.apache.wink.client.handlers.AbstractAuthSecurityHandler |
---|
handlerEncodedCredentials, handlerPassword, handlerUsername |
Constructor Summary | |
---|---|
ProxyAuthSecurityHandler()
|
|
ProxyAuthSecurityHandler(java.lang.String username,
java.lang.String password)
|
Method Summary | |
---|---|
ClientResponse |
handle(ClientRequest request,
HandlerContext context)
Performs basic HTTP authentication and proxy authentication, if necessary. |
Methods inherited from class org.apache.wink.client.handlers.AbstractAuthSecurityHandler |
---|
getEncodedString, setPassword, setUserName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProxyAuthSecurityHandler()
public ProxyAuthSecurityHandler(java.lang.String username, java.lang.String password)
Method Detail |
---|
public ClientResponse handle(ClientRequest request, HandlerContext context) throws java.lang.Exception
handle
in interface ClientHandler
client
- request objecthandler
- context object
java.lang.Exception
- any exception can be thrown by a handler and it will be
caught by the underlying client implementation and wrapped in
a ClientRuntimeException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |