com.ibm.wbi.protocol.http
Class HttpRequestEditor
com.ibm.wbi.Meg
|
+--com.ibm.wbi.RequestEditor
|
+--com.ibm.wbi.protocol.http.HttpRequestEditor
- Direct Known Subclasses:
- FirewallRequestEditor, 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
|
|
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. |
| 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 |
COPYRIGHT
public static final java.lang.String COPYRIGHT
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.
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.
- Overrides:
handleRequest in class RequestEditor
- 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.java.io.Exception - can be thrown if an exception was generated
by the Meg while processing the MegInput/OutputStreams.