com.ibm.wbi.plugin
Class Generator

com.ibm.wbi.plugin.Meg
  |
  +--com.ibm.wbi.plugin.Generator
Direct Known Subclasses:
HttpGenerator

public abstract class Generator
extends Meg

A generator has the ability to create the response satisfying a request produced by the request editors.


Field Summary
static java.lang.String COPYRIGHT
          IBM copyright information.
 
Fields inherited from class com.ibm.wbi.plugin.Meg
COPYRIGHT, EDITOR, GENERATOR, MONITOR, REQUEST_EDITOR, UNDEFINED
 
Constructor Summary
Generator()
          Constucts a new generator with default characteristics.
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.
 
Method Summary
 int getMegType()
          Get the generator meg type.
abstract  void handleRequest(RequestEvent event)
          Handle the specified request event.
 
Methods inherited from class com.ibm.wbi.plugin.Meg
forwardRequest, getCondition, getEnabled, getName, getPlugin, getPriority, isEnabled, processRejectedRequest, setCondition, setEnabled, setName, setPriority, setup, setup, setup, setup, threadManagerRun
 

Field Detail

COPYRIGHT

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

Generator

public Generator()
Constucts a new generator with default characteristics.

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 gemerator incase of a condition tie.
enabled - true if enabled.
Method Detail

getMegType

public final int getMegType()
Get the generator meg type.
Returns:
Meg.GENERATOR.
Overrides:
getMegType in class Meg

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.
java.io.Exception - can be thrown if an exception was generated by the meg while processing the MegInput/OutputStreams.
Overrides:
handleRequest in class Meg