com.ibm.wbi.protocol.http.beans
Class FirewallRequestEditor

com.ibm.wbi.Meg
  |
  +--com.ibm.wbi.RequestEditor
        |
        +--com.ibm.wbi.protocol.http.HttpRequestEditor
              |
              +--com.ibm.wbi.protocol.http.beans.FirewallRequestEditor

public class FirewallRequestEditor
extends HttpRequestEditor

RequestEditor for changing firewall settings on the current transaction only.


Field Summary
protected  int proxyPort
           
protected  java.lang.String proxyServer
           
protected  int socksPort
           
protected  java.lang.String socksServer
           
 
Fields inherited from class com.ibm.wbi.protocol.http.HttpRequestEditor
COPYRIGHT
 
Fields inherited from class com.ibm.wbi.Meg
EDITOR, GENERATOR, MONITOR, REQUEST_EDITOR, UNDEFINED
 
Constructor Summary
FirewallRequestEditor()
           
 
Method Summary
 int getProxyPort()
          Get the port to use for the proxy server.
 java.lang.String getProxyServer()
          Get the name of the proxy server.
 int getSocksPort()
          Get the port to use for the socks server.
 java.lang.String getSocksServer()
          Get the name of the socks server.
 void handleRequest(RequestEvent e)
          The method used by the proxy to edit the request and add the firewall information.
 void setProxy(java.lang.String server, int port)
          Set the proxy server and port.
 void setSocks(java.lang.String server, int port)
          Set the socks server and port.
 
Methods inherited from class com.ibm.wbi.protocol.http.HttpRequestEditor
getOriginalHttpRequest, setFinalHttpRequest
 
Methods inherited from class com.ibm.wbi.RequestEditor
getType
 
Methods inherited from class com.ibm.wbi.Meg
forwardRequest, getCondition, getEnabled, getMegProperty, getMegProperty, getMegPropertyKeys, getName, getPlugin, getPriority, getSystemContext, initialize, initialize, isEnabled, isMegApplicable, loadMegResources, run, setCondition, setEnabled, setMegProperty, setName, setPriority, setSystemContext, setup, setup, setup, setup
 

Field Detail

socksServer

protected java.lang.String socksServer

socksPort

protected int socksPort

proxyServer

protected java.lang.String proxyServer

proxyPort

protected int proxyPort
Constructor Detail

FirewallRequestEditor

public FirewallRequestEditor()
Method Detail

setSocks

public void setSocks(java.lang.String server,
                     int port)
Set the socks server and port.
Parameters:
server - Name of the socks server to use.
port - Port number of socks server (usually 1080).

setProxy

public void setProxy(java.lang.String server,
                     int port)
Set the proxy server and port.
Parameters:
server - Name of the proxy server to use.
port - Port number of proxy server (usually 80).

getSocksServer

public java.lang.String getSocksServer()
Get the name of the socks server.
Returns:
name of socks server (or null if not set).

getProxyServer

public java.lang.String getProxyServer()
Get the name of the proxy server.
Returns:
name of proxy server (or null if not set).

getSocksPort

public int getSocksPort()
Get the port to use for the socks server.
Returns:
port of socks server.

getProxyPort

public int getProxyPort()
Get the port to use for the proxy server.
Returns:
port of proxy server.

handleRequest

public void handleRequest(RequestEvent e)
                   throws RequestRejectedException,
                          java.io.IOException
The method used by the proxy to edit the request and add the firewall information.
Overrides:
handleRequest in class HttpRequestEditor
Parameters:
e - The request event.
Throws:
RequestRejectedException - To reject request.