TPTP 4.3.0 Monitoring Tools Project
Public API Specification

org.eclipse.hyades.logging.adapter
Interface IComponent

All Known Subinterfaces:
ICBEFilter, IContext, IExtractor, IFilter, IFormatter, IMessageFilter, IOutputter, IParser, IProcessUnit, ISensor
All Known Implementing Classes:
CBEFileOutputter, CBEFormatter, CBELogOutputter, CBEstdoutOutputter, Component, Context, Extractor, LogImportOutputter, Outputter, Parser, ProcessUnit, Sensor, SerializedCBEFormatter

public interface IComponent

Describes component behavior Main role of the component is to provide dynamic managability.


Method Summary
 IComponent[] getComponents()
          Method returns the components this component manages
 org.w3c.dom.Element getConfiguration()
          Method getConfiguration.
 org.w3c.dom.Element getContextConfiguration()
          Method getContextConfiguration.
 java.lang.String getDescription()
          Method returns the component description
 java.lang.String getExecutableClassName()
          Method returns the executable class name
 java.lang.String getImplementationCreationDate()
          Method returns implementation creation date
 java.lang.String getImplementationVersion()
          Method returns the version specific role description
 java.lang.String getImplementationVersionDescription()
          Method returns implementation version description
 IProcessUnit getLogger()
          Retrieve the logger for this adapter.
 short getLoggingLevel()
          Method returns loggin level of the component
 java.lang.String getName()
          Method returns name of the component
 IComponent getParent()
          Components are arranged in a heirarchy.
 java.lang.String getRole()
          Method returns the role of the component
 java.lang.String getRoleCreationDate()
          Method returns role creation date
 java.lang.String getRoleVersion()
          Method returns the role version
 java.lang.String getRoleVersionDescription()
          Method returns the version specific role description
 java.lang.String getUniqueID()
          Method returns the uniqueID of this component instance
 boolean init()
          Method init.
 void log(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent event)
          Logging method.
 void log(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent event, short level)
          Deprecated. Set the severity on the Common Base Event and use the log(CommonBaseEvent event) API.
 void setComponents(IComponent[] newComponents)
          Method sets the list of components this component manages.
 void setConfiguration(org.w3c.dom.Element newConfiguration)
          Sets the config.
 void setContextConfiguration(org.w3c.dom.Element newConfiguration)
          Sets the context config.
 void setDescription(java.lang.String newDescription)
          Method sets the description of this component
 void setExecutableClassName(java.lang.String newExecutableClassName)
          Method sets executable class name
 void setImplemenationCreationDate(java.lang.String newImplementationCreationDate)
          Method sets implementation creation date
 void setImplementationVersion(java.lang.String newImplementationVersion)
          Method sets the implementation version in the form of x.y.z where x is a major release level, which may have api changes y is a minor release level with no api changes z is an optional fix level with no api changes
 void setImplementationVersionDescription(java.lang.String newImplementationVersionDescription)
          Method sets implementation version description
 void setLogger(IProcessUnit logger)
          The logger will be set by the context during initialization.
 void setLoggingLevel(short newLevel)
          Method sets logging level of the component
 void setName(java.lang.String newName)
          Method sets name of the component
 void setParent(IComponent parent)
          Components are arranged in a heirarchy.
 void setRole(java.lang.String newRole)
          Method sets the role of the component
 void setRoleCreationDate(java.lang.String newCreationDate)
          Method sets role creation time
 void setRoleVersion(java.lang.String newRoleVersion)
          Method sets role version
 void setRoleVersionDescription(java.lang.String newRoleVersionDescription)
          Method sets the version specific role description
 void setUniqueID(java.lang.String newUniqueID)
          Method sets the uniqueID of this component instance
 void start()
          Method start.
 void stop()
          Method stop.
 void update()
          Method update.
 void update(org.w3c.dom.Element config)
          Method update.
 

Method Detail

init

public boolean init()
Method init. Sets all the context configuration properties based on the context config.

Returns:
boolean if init success

start

public void start()
Method start. Starts component activity


stop

public void stop()
Method stop. Stops the component activity


update

public void update(org.w3c.dom.Element config)
            throws AdapterInvalidConfig
Method update. Sets the component configuration with a root DOM Element and then request the component to update based on that Element.

Parameters:
config - - configuration DOM element
Throws:
AdapterInvalidConfig - if the configuration is invalid or cannot be processed.

update

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

Throws:
AdapterInvalidConfig - if the configuration is invalid or cannot be processed.

log

public void log(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent event)
Logging method.

The Common Base Event is logged based on its severity.

Parameters:
event - The Common Base Event to be logged.

log

public void log(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent event,
                short level)
Deprecated. Set the severity on the Common Base Event and use the log(CommonBaseEvent event) API.

Logging method.

Parameters:
event - The Common Base Event to be logged.
level - The severity of the Common Base Event to be logged.

getContextConfiguration

public org.w3c.dom.Element getContextConfiguration()
Method getContextConfiguration.

Returns:
Element - current config of the component

setContextConfiguration

public void setContextConfiguration(org.w3c.dom.Element newConfiguration)
Sets the context config.


getConfiguration

public org.w3c.dom.Element getConfiguration()
Method getConfiguration.

Returns:
Element - current config of the component

setConfiguration

public void setConfiguration(org.w3c.dom.Element newConfiguration)
Sets the config.


getComponents

public IComponent[] getComponents()
Method returns the components this component manages

Returns:
org.eclipse.hyades.logging.adapter.IComponent[]

setComponents

public void setComponents(IComponent[] newComponents)
Method sets the list of components this component manages. This component will now be considered the parent of each element it manages.


getLoggingLevel

public short getLoggingLevel()
Method returns loggin level of the component

Returns:
short

setLoggingLevel

public void setLoggingLevel(short newLevel)
Method sets logging level of the component

Parameters:
newLevel - - new logging level

getName

public java.lang.String getName()
Method returns name of the component

Returns:
String

setName

public void setName(java.lang.String newName)
Method sets name of the component


getRole

public java.lang.String getRole()
Method returns the role of the component

Returns:
String

setRole

public void setRole(java.lang.String newRole)
Method sets the role of the component


getDescription

public java.lang.String getDescription()
Method returns the component description

Returns:
String

setDescription

public void setDescription(java.lang.String newDescription)
Method sets the description of this component


getUniqueID

public java.lang.String getUniqueID()
Method returns the uniqueID of this component instance

Returns:
String

setUniqueID

public void setUniqueID(java.lang.String newUniqueID)
Method sets the uniqueID of this component instance


getExecutableClassName

public java.lang.String getExecutableClassName()
Method returns the executable class name

Returns:
String

setExecutableClassName

public void setExecutableClassName(java.lang.String newExecutableClassName)
Method sets executable class name


getRoleVersion

public java.lang.String getRoleVersion()
Method returns the role version

Returns:
String

setRoleVersion

public void setRoleVersion(java.lang.String newRoleVersion)
Method sets role version


getRoleCreationDate

public java.lang.String getRoleCreationDate()
Method returns role creation date

Returns:
String

setRoleCreationDate

public void setRoleCreationDate(java.lang.String newCreationDate)
Method sets role creation time


getRoleVersionDescription

public java.lang.String getRoleVersionDescription()
Method returns the version specific role description

Returns:
String

setRoleVersionDescription

public void setRoleVersionDescription(java.lang.String newRoleVersionDescription)
Method sets the version specific role description


getImplementationVersion

public java.lang.String getImplementationVersion()
Method returns the version specific role description

Returns:
String

setImplementationVersion

public void setImplementationVersion(java.lang.String newImplementationVersion)
Method sets the implementation version in the form of x.y.z where x is a major release level, which may have api changes y is a minor release level with no api changes z is an optional fix level with no api changes


getImplementationCreationDate

public java.lang.String getImplementationCreationDate()
Method returns implementation creation date

Returns:
String

setImplemenationCreationDate

public void setImplemenationCreationDate(java.lang.String newImplementationCreationDate)
Method sets implementation creation date


getImplementationVersionDescription

public java.lang.String getImplementationVersionDescription()
Method returns implementation version description

Returns:
String

setImplementationVersionDescription

public void setImplementationVersionDescription(java.lang.String newImplementationVersionDescription)
Method sets implementation version description


getLogger

public IProcessUnit getLogger()
Retrieve the logger for this adapter. This cannot be called until the Component has been initialized by the init() method.

Returns:
the logger for this adapter

setLogger

public void setLogger(IProcessUnit logger)
The logger will be set by the context during initialization.

Parameters:
logger - the logger for this component to use

setParent

public void setParent(IComponent parent)
Components are arranged in a heirarchy. Sets the parent component of this component.

Parameters:
parent - the parent component in the hierarchy

getParent

public IComponent getParent()
Components are arranged in a heirarchy. Gets the parent component of this component.

Returns:
the parent component

TPTP 4.3.0 Monitoring Tools Project
Public API Specification