com.ibm.wbi
Class Generator
com.ibm.wbi.Meg
|
+--com.ibm.wbi.Generator
- Direct Known Subclasses:
- HttpGenerator
- public abstract class Generator
- extends Meg
A Generator is responsible for producing a response
in the Meg chain. The first Generator that
matches conditions with the request and does not reject the request
will be the only Generator allowed to service the request
in the chain. A Generator is guaranteed to be run only
after all RequestEditors matching the request are invoked.
|
Constructor Summary |
Generator()
Constructs a new Generator with default
characteristics and is enabled. |
Generator(java.lang.String name,
java.lang.String condition,
int priority)
Constructs a new Generator with the specified
characteristics and is enabled. |
Generator(java.lang.String name,
java.lang.String condition,
int priority,
boolean enabled)
Constructs a new Generator with the specified
characteristics. |
| 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 |
Generator
public Generator()
- Constructs a new
Generator with default
characteristics and is enabled.
- name = New Generator
- condition = %true%
- priority = 1
Generator
public Generator(java.lang.String name,
java.lang.String condition,
int priority)
- Constructs a new
Generator with the specified
characteristics and is enabled.
- Parameters:
name - The name of the Generator.condition - The condition under which this Generator
should be invoked.priority - The priority of the Generator incase
of a condition tie.
Generator
public Generator(java.lang.String name,
java.lang.String condition,
int priority,
boolean enabled)
- Constructs a new
Generator with the specified
characteristics.
- Parameters:
name - The name of the Generator.condition - The condition under which this Generator
should be invoked.priority - The priority of the Generator incase
of a condition tie.enabled - true if enabled.
getType
public int getType()
- Get the
Meg type associated with a Generator.
- Overrides:
getType in class Meg
- Returns:
- This always returns
Meg.GENERATOR.
handleRequest
public abstract void handleRequest(RequestEvent event)
throws RequestRejectedException,
java.io.IOException
- Handle the specified
RequestEvent.
- Overrides:
handleRequest in class Meg
- Parameters:
event - The RequestEvent for the request to
handle.- Throws:
RequestRejectedException - If rejecting request, this
must be thrown before the first write() is
made to the output stream.java.io.IOException - If an error occurs parsing input or
output streams