|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rabbit.proxy.HttpProxy
public class HttpProxy
A filtering and caching http proxy.
Field Summary | |
---|---|
protected boolean |
proxySSL
Are we allowed to proxy ssl? |
protected List<Integer> |
sslports
The List of acceptable ssl-ports. |
static String |
VERSION
Current version |
Constructor Summary | |
---|---|
HttpProxy()
|
Method Summary | |
---|---|
void |
addCurrentConnection(Connection con)
Add a current connection |
protected BufferHandler |
getBufferHandler()
|
Cache<HttpHeader,HttpHeader> |
getCache()
|
Config |
getConfig()
Get the configuration of the proxy. |
ConnectionHandler |
getConnectionHandler()
Get the connection handler. |
int |
getConnectPort(int port)
Get the port to connect to. |
Counter |
getCounter()
|
List<Connection> |
getCurrentConnections()
Get all the current connections |
InetAddress |
getHost()
Get the local host. |
HttpGeneratorFactory |
getHttpGeneratorFactory()
|
void |
getInetAddress(URL url,
InetAddressListener ial)
Get the InetAddress for a given url. |
NioHandler |
getNioHandler()
|
long |
getOffset()
|
int |
getPort()
Get the port this proxy is using. |
String |
getProxyAuthString()
Get the authenticationstring to use for proxy. |
String |
getServerIdentity()
|
long |
getStartTime()
|
boolean |
getStrictHttp()
|
TrafficLoggerHandler |
getTrafficLoggerHandler()
Get the currently transferred traffic statistics. |
String |
getVersion()
|
void |
getWebConnection(HttpHeader header,
WebConnectionListener wcl)
Get a WebConnection. |
boolean |
isProxyConnected()
Is this proxy chained to another proxy? |
boolean |
isSelf(String uhost,
int urlport)
Try hard to check if the given address matches the proxy. |
void |
markForPipelining(WebConnection wc)
Mark a WebConnection for pipelining. |
void |
releaseWebConnection(WebConnection wc)
Release a WebConnection so that it may be reused if possible. |
void |
removeCurrentConnection(Connection con)
Remove a current connection. |
void |
setConfig(String conf)
Set the config file to use for this proxy. |
void |
setStrictHttp(boolean b)
|
void |
start()
Run the proxy in a separate thread. |
void |
stop()
Run the proxy in a separate thread. |
protected void |
updateTrafficLog(TrafficLoggerHandler tlh)
Update the currently transferred traffic statistics. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String VERSION
protected boolean proxySSL
protected List<Integer> sslports
Constructor Detail |
---|
public HttpProxy() throws UnknownHostException
UnknownHostException
Method Detail |
---|
public void setConfig(String conf) throws IOException
conf
- the name of the file to use for proxy configuration.
IOException
public void setStrictHttp(boolean b)
public boolean getStrictHttp()
public void start()
public void stop()
public NioHandler getNioHandler()
public Cache<HttpHeader,HttpHeader> getCache()
public long getOffset()
public long getStartTime()
public Counter getCounter()
public Config getConfig()
public String getVersion()
public String getServerIdentity()
public InetAddress getHost()
public int getPort()
public void getInetAddress(URL url, InetAddressListener ial)
getInetAddress
in interface Resolver
url
- the URL to lookup.ial
- the InetAddressListener to notify when lookup is done.public int getConnectPort(int port)
getConnectPort
in interface Resolver
port
- the port we want to connect to.
public boolean isSelf(String uhost, int urlport)
public boolean isProxyConnected()
isProxyConnected
in interface Resolver
public String getProxyAuthString()
getProxyAuthString
in interface Resolver
public void getWebConnection(HttpHeader header, WebConnectionListener wcl)
header
- the http header to get the host and port fromwcl
- the listener that wants to get the connection.public void releaseWebConnection(WebConnection wc)
wc
- the WebConnection to release.public void markForPipelining(WebConnection wc)
wc
- the WebConnection to mark.public void addCurrentConnection(Connection con)
con
- the connectionpublic void removeCurrentConnection(Connection con)
con
- the connectionpublic ConnectionHandler getConnectionHandler()
public List<Connection> getCurrentConnections()
protected void updateTrafficLog(TrafficLoggerHandler tlh)
public TrafficLoggerHandler getTrafficLoggerHandler()
protected BufferHandler getBufferHandler()
public HttpGeneratorFactory getHttpGeneratorFactory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |