osdep.proxy
Class ProxyHandler

java.lang.Object
  extended by osdep.proxy.ProxyHandler

public class ProxyHandler
extends java.lang.Object

sets the proxy properties before it opens a connection, puts back the old proxy properties when the connection is terminated

Author:
SHZ Mar 6, 2008

Constructor Summary
ProxyHandler(IProxySource proxySource)
           
 
Method Summary
<E extends java.lang.Exception>
void
doWithProxy(java.lang.String protocol, ICallableWithParameter<java.lang.Void,java.lang.Boolean,E> toDo)
          Sets up a proxy for a certain protocol ("http" or "ftp"), calls a function (that uses the proxy to open a connection) and puts back the previous proxy properties
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyHandler

public ProxyHandler(IProxySource proxySource)
Parameters:
proxySource -
Method Detail

doWithProxy

public <E extends java.lang.Exception> void doWithProxy(java.lang.String protocol,
                                                        ICallableWithParameter<java.lang.Void,java.lang.Boolean,E> toDo)
                 throws ConnectionException,
                        E extends java.lang.Exception,
                        ProxyException
Sets up a proxy for a certain protocol ("http" or "ftp"), calls a function (that uses the proxy to open a connection) and puts back the previous proxy properties

Parameters:
protocol -
toDo -
Throws:
ConnectionException
E
ProxyException
java.lang.Exception