TPTP 4.0.0 Monitoring Tools Project
Public API Specification

org.eclipse.hyades.logging.adapter.impl
Class ProcessUnit

java.lang.Object
  extended byorg.eclipse.hyades.logging.adapter.impl.Component
      extended byorg.eclipse.hyades.logging.adapter.impl.ProcessUnit
All Implemented Interfaces:
IComponent, IProcessUnit
Direct Known Subclasses:
CBEFormatter, CBEstdoutOutputter, Extractor, Outputter, Parser, Sensor, SerializedCBEFormatter

public abstract class ProcessUnit
extends Component
implements IProcessUnit

A generic process unit in the Generic Log Adapter run-time architecture.


Field Summary
protected  boolean flushingMode
           
 
Fields inherited from class org.eclipse.hyades.logging.adapter.impl.Component
logger, status, stopping
 
Constructor Summary
ProcessUnit()
           
 
Method Summary
 java.lang.Object[] flushEventItems(java.lang.Object[] msgs)
          Flush event items.
 java.util.Hashtable getProperties()
          Get the properties of this process unit.
 java.lang.Object[] processEventItems(java.lang.Object[] msgs)
          Process event items.
 void setProperties(java.util.Hashtable hashtable)
          Set the properties of this process unit.
 java.lang.Object[] testProcessEventItems(java.lang.Object[] msgs)
          In order to avoid runtime failures a context should invoke this test method.
 void update()
          Method update.
 
Methods inherited from class org.eclipse.hyades.logging.adapter.impl.Component
clean, getComponents, getComponentStatus, getConfiguration, getContextConfiguration, getDescription, getEventFactory, getExecutableClassName, getImplementationCreationDate, getImplementationVersion, getImplementationVersionDescription, getItemsProcessedCount, getLogger, getLoggingLevel, getName, getParent, getRole, getRoleCreationDate, getRoleVersion, getRoleVersionDescription, getUniqueID, incrementItemsProcessedCount, incrementItemsProcessedCount, init, isStopping, log, log, setComponents, setConfiguration, setContextConfiguration, setDescription, setExecutableClassName, setImplemenationCreationDate, setImplementationVersion, setImplementationVersionDescription, setLogger, setLoggingLevel, setName, setParent, setRole, setRoleCreationDate, setRoleVersion, setRoleVersionDescription, setStopping, setUniqueID, start, stop, stop, trace, trace, trace, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.hyades.logging.adapter.IComponent
getComponents, getConfiguration, getContextConfiguration, getDescription, getExecutableClassName, getImplementationCreationDate, getImplementationVersion, getImplementationVersionDescription, getLogger, getLoggingLevel, getName, getParent, getRole, getRoleCreationDate, getRoleVersion, getRoleVersionDescription, getUniqueID, init, log, log, setComponents, setConfiguration, setContextConfiguration, setDescription, setExecutableClassName, setImplemenationCreationDate, setImplementationVersion, setImplementationVersionDescription, setLogger, setLoggingLevel, setName, setParent, setRole, setRoleCreationDate, setRoleVersion, setRoleVersionDescription, setUniqueID, start, stop, update
 

Field Detail

flushingMode

protected boolean flushingMode
Constructor Detail

ProcessUnit

public ProcessUnit()
Method Detail

processEventItems

public java.lang.Object[] processEventItems(java.lang.Object[] msgs)
Process event items. This method should be overridden by concrete implementations.

Specified by:
processEventItems in interface IProcessUnit
Parameters:
msgs - - the input messages as an array of Objects
Returns:
the processed data as an array of Objects
See Also:
IProcessUnit.processEventItems(Object[])

flushEventItems

public java.lang.Object[] flushEventItems(java.lang.Object[] msgs)
Flush event items. This method should be overridden by any Component that buffers data

Specified by:
flushEventItems in interface IProcessUnit
Parameters:
msgs - - the input messages as an array of Objects
Returns:
the flushed data as an array of Objects
See Also:
IProcessUnit.flushEventItems(java.lang.Object[])

testProcessEventItems

public java.lang.Object[] testProcessEventItems(java.lang.Object[] msgs)
                                         throws AdapterInvalidConfig
Description copied from interface: IProcessUnit
In order to avoid runtime failures a context should invoke this test method. An implementation should test for the appropriate types it will consume and produce thus simulating a runtime environment. If a type is not supported an exception should be thrown.

Specified by:
testProcessEventItems in interface IProcessUnit
Parameters:
msgs - - the sample input messages as an array of Objects
Returns:
sample processed data as an array of Objects
Throws:
AdapterInvalidConfig - exception if the wrong type of objects are passed in
See Also:
org.eclipse.hyades.logging.adapter.IProcessUnit#processEventItem(Object[])

update

public void update()
            throws AdapterInvalidConfig
Description copied from interface: IComponent
Method update. By reading the current component configuration, sets the properties of the component. Subclasses should invoke parent update() to ensure proper behaviour.

Specified by:
update in interface IComponent
Overrides:
update in class Component
Throws:
AdapterInvalidConfig
See Also:
IComponent.update()

getProperties

public java.util.Hashtable getProperties()
Get the properties of this process unit.

Returns:
the properties of the process unit in a Hashtable.

setProperties

public void setProperties(java.util.Hashtable hashtable)
Set the properties of this process unit.

Parameters:
hashtable - - Hashtable containing the properties of the process unit.

TPTP 4.0.0 Monitoring Tools Project
Public API Specification