com.ibm.wbi.http.plugin
Class HttpRequestEditor

com.ibm.wbi.plugin.Meg
  |
  +--com.ibm.wbi.plugin.RequestEditor
        |
        +--com.ibm.wbi.http.plugin.HttpRequestEditor
Direct Known Subclasses:
ImageMapRequestEditor, NewUrlRequestEditor

public abstract class HttpRequestEditor
extends RequestEditor

An abstract RequestEditor base class that is specifically used for HTTP requests.


Field Summary
static java.lang.String COPYRIGHT
          IBM copyright information.
 
Fields inherited from class com.ibm.wbi.plugin.RequestEditor
COPYRIGHT
 
Fields inherited from class com.ibm.wbi.plugin.Meg
COPYRIGHT, EDITOR, GENERATOR, MONITOR, REQUEST_EDITOR, UNDEFINED
 
Constructor Summary
HttpRequestEditor()
          Construct a new HTTP request editor with default parameters.
HttpRequestEditor(java.lang.String name, java.lang.String condition, int priority)
          Construct a new HTTP request editor with specified parameters and is enabled.
HttpRequestEditor(java.lang.String name, java.lang.String condition, int priority, boolean enabled)
          Construct a new HTTP request editor with specified parameters.
 
Method Summary
static HttpRequest getOriginalHttpRequest(RequestEvent event)
          Get the original HTTP request object.
abstract  void handleRequest(RequestEvent event)
          Handle the specified request event.
static void setFinalHttpRequest(RequestEvent event, HttpRequest request)
          Set the final HTTP request header (set the header in the output stream).
 
Methods inherited from class com.ibm.wbi.plugin.RequestEditor
getMegType, processRejectedRequest
 
Methods inherited from class com.ibm.wbi.plugin.Meg
forwardRequest, getCondition, getEnabled, getName, getPlugin, getPriority, isEnabled, setCondition, setEnabled, setName, setPriority, setup, setup, setup, setup, threadManagerRun
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
IBM copyright information.
Constructor Detail

HttpRequestEditor

public HttpRequestEditor()
Construct a new HTTP request editor with default parameters.

HttpRequestEditor

public HttpRequestEditor(java.lang.String name,
                         java.lang.String condition,
                         int priority)
Construct a new HTTP request editor with specified parameters and is enabled.
Parameters:
name - The name of the request editor.
condition - The condition that request editor is called under.
priority - The priority.

HttpRequestEditor

public HttpRequestEditor(java.lang.String name,
                         java.lang.String condition,
                         int priority,
                         boolean enabled)
Construct a new HTTP request editor with specified parameters.
Parameters:
name - The name of the request editor.
condition - The condition that request editor is called under.
priority - The priority.
enabled - true if request editor is enabled; else false for disabled.
Method Detail

getOriginalHttpRequest

public static HttpRequest getOriginalHttpRequest(RequestEvent event)
Get the original HTTP request object.
Parameters:
event - The request event to extract the request from.

setFinalHttpRequest

public static void setFinalHttpRequest(RequestEvent event,
                                       HttpRequest request)
Set the final HTTP request header (set the header in the output stream).
Parameters:
event - The request event to write the request to.
request - The request to write.

handleRequest

public abstract void handleRequest(RequestEvent event)
                            throws RequestRejectedException,
                                   java.io.IOException
Handle the specified request event.
Parameters:
event - The request event with an input and output stream.
Throws:
RequestRejectedException - If rejecting request, this must be thrown before the first write() is made to the output stream.
Overrides:
handleRequest in class RequestEditor