com.ibm.wbi.plugin
Class Monitor

com.ibm.wbi.plugin.Meg
  |
  +--com.ibm.wbi.plugin.Monitor
Direct Known Subclasses:
HttpMonitor

public abstract class Monitor
extends Meg

A Monitor has the opportunity to "monitor" the response after the Generator, and either before all, after all, or after a specific Editor. A monitor can not modify the request/response in any way.


Field Summary
static java.lang.String COPYRIGHT
          IBM copyright information.
static int END
          A Monitor that is run after all Editors.
static int START
          A Monitor that is run before all Editors.
 
Fields inherited from class com.ibm.wbi.plugin.Meg
COPYRIGHT, EDITOR, GENERATOR, MONITOR, REQUEST_EDITOR, UNDEFINED
 
Constructor Summary
Monitor()
          Construct a monitor with default parameters.
Monitor(java.lang.String name, java.lang.String condition, int priority)
          Construct a new monitor with specified parameters that is enabled.
Monitor(java.lang.String name, java.lang.String condition, int priority, boolean enabled)
          Construct a new monitor with specified parameters.
 
Method Summary
 int getMegType()
          Get the meg type.
 int getMonitorType()
          Get the monitor type.
abstract  void handleRequest(RequestEvent event)
          The method called to handle a request that satisfies the meg's condition.
 void setMonitorType(int type)
          Set the monitor type.
 
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.

START

public static final int START
A Monitor that is run before all Editors.

END

public static final int END
A Monitor that is run after all Editors.
Constructor Detail

Monitor

public Monitor()
Construct a monitor with default parameters.

Monitor

public Monitor(java.lang.String name,
               java.lang.String condition,
               int priority)
Construct a new monitor with specified parameters that is enabled.
Parameters:
name - The name.
condition - The condition under which it is run.
priority - The priority.

Monitor

public Monitor(java.lang.String name,
               java.lang.String condition,
               int priority,
               boolean enabled)
Construct a new monitor with specified parameters.
Parameters:
name - The name.
condition - The condition under which it is run.
priority - The priority.
enabled - The enabled state.
Method Detail

getMegType

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

getMonitorType

public final int getMonitorType()
Get the monitor type.
Returns:
One of START, EDITOR, END.

setMonitorType

public final void setMonitorType(int type)
Set the monitor type.
Parameters:
type - One of START, EDITOR, END.

handleRequest

public abstract void handleRequest(RequestEvent event)
                            throws java.io.IOException
The method called to handle a request that satisfies the meg's condition. A monitor can not modify the streams.
Parameters:
event - The request event used to modify the request/response.
Overrides:
handleRequest in class Meg