osdep.proxy
Class ProxyAuthenticationHandler

java.lang.Object
  extended by 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

Constructor Summary
ProxyAuthenticationHandler(IProxySource proxySource, IProxyAuthenticationSource authenticationSource)
           
 
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
 

Constructor Detail

ProxyAuthenticationHandler

public ProxyAuthenticationHandler(IProxySource proxySource,
                                  IProxyAuthenticationSource authenticationSource)
Parameters:
authenticationSource -
Method Detail

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