TPTP 4.0.0 Monitoring Tools Project
Public API Specification

org.eclipse.hyades.logging.adapter
Interface ISensor

All Superinterfaces:
IComponent, IProcessUnit
All Known Implementing Classes:
Sensor

public interface ISensor
extends IProcessUnit

ISensor defines the basic Sensor implementation requirements. A Sensor reads data from some source that is to be processed by other components in the context.


Method Summary
 java.lang.Object[] flush()
          Method flush() This method will be called by the context when it is stopping.
 java.lang.Object[] getNext()
          Method getNext Gets the next set of data from the source being sensed.
 java.lang.String getType()
          Method getType Returns the sensor type.
 void setType(java.lang.String newType)
          Method setType.
 java.lang.Object[] testGetNext()
          Method testGetNext In order to avoid runtime failures a context should invoke this test method.
 
Methods inherited from interface org.eclipse.hyades.logging.adapter.IProcessUnit
flushEventItems, processEventItems, testProcessEventItems
 
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, update
 

Method Detail

getNext

public java.lang.Object[] getNext()
Method getNext Gets the next set of data from the source being sensed. This set of data will be passed to the next component for processing. A contract is required between the sensor and the next component for the type of object returned.

Returns:
the data as an array of Objects

testGetNext

public java.lang.Object[] testGetNext()
Method testGetNext In order to avoid runtime failures a context should invoke this test method. An implementation should return a set of data of a type expected by the consumer component, thus simulating a runtime environment.

Returns:
sample data as an array of Objects

flush

public java.lang.Object[] flush()
Method flush() This method will be called by the context when it is stopping. An implementation should return any data from the source that remains in any internal sensor buffers that should be processed by the next component.

Returns:
the flushed data as an array of Objects

setType

public void setType(java.lang.String newType)
Method setType. Set the sensor type.

Parameters:
newType - - the type of the sensor as a String name

getType

public java.lang.String getType()
Method getType Returns the sensor type.

Returns:
the type of the sensor as a String name

TPTP 4.0.0 Monitoring Tools Project
Public API Specification