TPTP 4.2.0 Monitoring Tools Project
Public API Specification

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

java.lang.Object
  extended byorg.eclipse.hyades.logging.adapter.impl.Status
All Implemented Interfaces:
IStatus
Direct Known Subclasses:
SensorStatus

public class Status
extends java.lang.Object
implements IStatus

Implementation of the IStatus interface to represent the status of an adapter entity (eg. Component or Context)


Constructor Summary
Status()
           
 
Method Summary
 IStatus[] getChildrenStatus()
          Get the status of all of this entity's children.
 IStatus getChildStatus(java.lang.String name)
          Get the status of the child entity with the specified name.
 long getElapsedTimeInMilliseconds()
          Get the elpased time since the entity started executing as a long in milliseconds.
 float getElpasedTimeInSeconds()
          Get the elpased time since the entity started executing as a float in seconds.
 int getItemsProcessedCount()
          Get the number of items this entity has processed.
 java.lang.String getName()
          Gets the name of the entity this status is for.
 boolean isActive()
          Returns whether the entity this status is for is active All child status objects are checked as well.
 void setActive(boolean active)
          Sets the active status of the entity
 void setChildrenStatus(IStatus[] children)
          Sets the status of children entities
 void setItemsProcessedCount(int itemsProcessedCount)
          Sets the count of the number of items processed by this entity
 void setName(java.lang.String name)
          Sets the name of the entity this status is for.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Status

public Status()
Method Detail

setName

public void setName(java.lang.String name)
Sets the name of the entity this status is for.

Parameters:
name - The name to set.

getName

public java.lang.String getName()
Gets the name of the entity this status is for.

Specified by:
getName in interface IStatus
Returns:
the name of the entity the status is for.
See Also:
IStatus.getName()

setActive

public void setActive(boolean active)
Sets the active status of the entity

Parameters:
active - The active status to set.

isActive

public boolean isActive()
Returns whether the entity this status is for is active All child status objects are checked as well.

Specified by:
isActive in interface IStatus
Returns:
true if the entity is active, false otherwise.
See Also:
IStatus.isActive()

setItemsProcessedCount

public void setItemsProcessedCount(int itemsProcessedCount)
Sets the count of the number of items processed by this entity

Parameters:
itemsProcessedCount - The itemsProcessedCount to set.

getItemsProcessedCount

public int getItemsProcessedCount()
Get the number of items this entity has processed. The number returned also takes into account the counts from the children.

Specified by:
getItemsProcessedCount in interface IStatus
Returns:
the number of items processed by this entity and its children.
See Also:
IStatus.getItemsProcessedCount()

setChildrenStatus

public void setChildrenStatus(IStatus[] children)
Sets the status of children entities

Parameters:
children - The status of children.

getChildrenStatus

public IStatus[] getChildrenStatus()
Get the status of all of this entity's children.

Specified by:
getChildrenStatus in interface IStatus
Returns:
an array of IStatus objects
See Also:
IStatus.getChildrenStatus()

getChildStatus

public IStatus getChildStatus(java.lang.String name)
Get the status of the child entity with the specified name.

Specified by:
getChildStatus in interface IStatus
Parameters:
name - of entity
Returns:
the IStatus object for the specified child entity.
See Also:
IStatus.getChildStatus(java.lang.String)

getElapsedTimeInMilliseconds

public long getElapsedTimeInMilliseconds()
Get the elpased time since the entity started executing as a long in milliseconds.

Specified by:
getElapsedTimeInMilliseconds in interface IStatus
Returns:
the elapsed time in milliseconds.
See Also:
IStatus.getElapsedTimeInMilliseconds()

getElpasedTimeInSeconds

public float getElpasedTimeInSeconds()
Get the elpased time since the entity started executing as a float in seconds.

Returns:
the elapsed time in seconds

TPTP 4.2.0 Monitoring Tools Project
Public API Specification