osdep
Class ConnectionHandler

java.lang.Object
  extended by osdep.ConnectionHandler

public class ConnectionHandler
extends java.lang.Object

Connects to an HTTP site, authenticating the user to the proxy if needed

Author:
SHZ Mar 6, 2008

Constructor Summary
ConnectionHandler(ProxyAuthenticationHandler authenticationHandler)
           
 
Method Summary
<E extends java.lang.Exception>
void
doWithConnection(java.lang.String httpAddress, ICallableWithParameter<java.lang.Void,java.net.URLConnection,E> toDo)
          Authenticate the user to the proxy, connects to the http site, and calls a callback function to do somehing with the connection
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionHandler

public ConnectionHandler(ProxyAuthenticationHandler authenticationHandler)
Parameters:
authenticationHandler - the object that applies the proxy authentication to the connection
Method Detail

doWithConnection

public <E extends java.lang.Exception> void doWithConnection(java.lang.String httpAddress,
                                                             ICallableWithParameter<java.lang.Void,java.net.URLConnection,E> toDo)
                      throws E extends java.lang.Exception,
                             ConnectionException
Authenticate the user to the proxy, connects to the http site, and calls a callback function to do somehing with the connection

Parameters:
httpAddress -
toDo -
Throws:
E
ConnectionException
java.lang.Exception