osdep.proxy
Class ProxyAuthenticationHandler
java.lang.Object
osdep.proxy.ProxyAuthenticationHandler
public class ProxyAuthenticationHandler
- extends java.lang.Object
To open a connection through a proxy that requires authentication
- Author:
- SHZ Mar 6, 2008
Method Summary |
<E extends java.lang.Exception>
void |
|
doWithProxyAuthentication(java.net.URLConnection connection,
ICallableWithParameter<java.lang.Void,java.net.URLConnection,E> toDo)
Applies the authentication properties to the connection, calls a callback function that
uses the connection and puts back the authentication properties to the values that
they had before. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProxyAuthenticationHandler
public ProxyAuthenticationHandler(IProxySource proxySource,
IProxyAuthenticationSource authenticationSource)
- Parameters:
authenticationSource
-
doWithProxyAuthentication
public <E extends java.lang.Exception> void doWithProxyAuthentication(java.net.URLConnection connection,
ICallableWithParameter<java.lang.Void,java.net.URLConnection,E> toDo)
throws E extends java.lang.Exception,
ConnectionException
- Applies the authentication properties to the connection, calls a callback function that
uses the connection and puts back the authentication properties to the values that
they had before.
- Parameters:
connection
- toDo
-
- Throws:
E
ConnectionException
java.lang.Exception