writeContent -- writes the HTTP content to the RequestEvent's
output stream.
|
Method Summary |
protected java.lang.String |
getHeader(RequestEvent e)
Called third, should return the HTTP response header string. |
void |
handleRequest(RequestEvent e)
This method is called by the Proxy. |
protected void |
initialize(RequestEvent e)
Called first, override if you need to prepare for the transaction by
setting up some class variables. |
protected boolean |
verify(RequestEvent e)
Called second, override if you wish to check some set of conditions. |
protected void |
writeContent(RequestEvent e)
Called fourth, should write the appropriate data into the output stream
object on the request event. |
| Methods inherited from class com.ibm.wbi.protocol.http.HttpGenerator |
add, addCookie, getContentType, getHttpResponse, getHttpResponseString, getResponseCode, getResponseText, isCache, produceHeader, set, setCache, setContentLength, setContentType, setResponseCode, setResponseText, setServer, writeHeader |
| 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 |
FourStepHttpGenerator
public FourStepHttpGenerator()
- Construct a new four step HTTP generator.
initialize
protected void initialize(RequestEvent e)
- Called first, override if you need to prepare for the transaction by
setting up some class variables.
- Parameters:
e - The request event.
verify
protected boolean verify(RequestEvent e)
- Called second, override if you wish to check some set of conditions.
- Returns:
true to accept this request and handle it [default]
false to reject this request and let someone
else handle it
getHeader
protected java.lang.String getHeader(RequestEvent e)
- Called third, should return the HTTP response header string. By
default, this returns the HTTP header produced from the parent's
HTTPGenerator HTTPResponse object.
writeContent
protected void writeContent(RequestEvent e)
throws java.io.IOException,
RequestRejectedException
- Called fourth, should write the appropriate data into the output stream
object on the request event.
handleRequest
public void handleRequest(RequestEvent e)
throws RequestRejectedException,
java.io.IOException
- This method is called by the
Proxy. It calls initialize(),
verify(), produceHeader() and writeContent() in order.
- Overrides:
handleRequest in class HttpGenerator
- Throws:
RequestRejectedException - thrown if
verify(RequestEvent) returns false or
getHeader(RequestEvent) returns null.java.io.IOException - thrown if writing the data has a problem