com.jamonapi
Class MonitorLeafFactory

java.lang.Object
  |
  +--com.jamonapi.MonitorLeafFactory
All Implemented Interfaces:
MonitorLeafFactoryInterface

public class MonitorLeafFactory
extends java.lang.Object
implements MonitorLeafFactoryInterface

The MonitorLeafFactory is an important class in that it determines how to create Monitor objects. It uses the Gang of 4's decorator pattern to create the Monitors


Field Summary
static java.lang.String DEFAULT
           
static java.lang.String PRIMARY
           
 
Constructor Summary
MonitorLeafFactory()
           
 
Method Summary
 LeafNode createInstance(java.lang.String monitorType)
          This is the method that creates monitors.
 java.lang.String[] getHeader()
          Get the header used in the monitor html report.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final java.lang.String DEFAULT
See Also:
Constant Field Values

PRIMARY

public static final java.lang.String PRIMARY
See Also:
Constant Field Values
Constructor Detail

MonitorLeafFactory

public MonitorLeafFactory()
Method Detail

getHeader

public java.lang.String[] getHeader()
Get the header used in the monitor html report. Each Monitor in the decorator chain will provide its own header value

Specified by:
getHeader in interface MonitorLeafFactoryInterface

createInstance

public LeafNode createInstance(java.lang.String monitorType)
This is the method that creates monitors. Note the decorator chaing. If the Monitor is of type 'Primary' then the monitor is marked as such. To change the type of Monitors that are returned simply change this routine. For example if one of the new statements is removed in this code then that Monitor will no longer be created.

Specified by:
createInstance in interface MonitorLeafFactoryInterface