nl.gx.webmanager.services.systemhealth.tracker.impl
Class SystemHealthIndicatorWrapper

java.lang.Object
  extended by nl.gx.webmanager.services.systemhealth.tracker.impl.SystemHealthIndicatorWrapper
All Implemented Interfaces:
SystemHealthIndicator, SystemHealthIndicatorWrapperMBean

public final class SystemHealthIndicatorWrapper
extends java.lang.Object
implements SystemHealthIndicatorWrapperMBean

Wraps a SystemHealthIndicator in order to comply to the JMX spec.


Nested Class Summary
 
Nested classes/interfaces inherited from interface nl.gx.webmanager.services.systemhealth.SystemHealthIndicator
SystemHealthIndicator.ValueStatus
 
Field Summary
 
Fields inherited from interface nl.gx.webmanager.services.systemhealth.SystemHealthIndicator
CATEGORY_CACHING, CATEGORY_RESPONSE_TIME, CATEGORY_SETTINGS, JMX_CATEGORY_KEY, JMX_PI_DOMAIN, JMX_TITLE_KEY, JMX_TYPE_KEY, TYPE_CUSTOM, TYPE_SYSTEM
 
Constructor Summary
SystemHealthIndicatorWrapper(SystemHealthIndicator shi)
          Construct a wrapper around the given system health indicator.
 
Method Summary
 java.lang.String getCategory()
          Get the category of this indicator.
 java.lang.String getId()
          
 java.lang.String getMessage(java.util.Locale locale)
          Get an explanatory message in the given language.
 java.lang.String getName(java.util.Locale locale)
          Get name of this performance indicator in the given language.
 java.lang.String getType()
          Get the type of this indicator.
 java.lang.Object getValue()
          
 SystemHealthIndicator.ValueStatus getValueState()
          
 void reset()
          Resets the indicator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemHealthIndicatorWrapper

public SystemHealthIndicatorWrapper(SystemHealthIndicator shi)
Construct a wrapper around the given system health indicator.

Parameters:
shi - the system health monitor to wrap
Method Detail

getCategory

public java.lang.String getCategory()
Get the category of this indicator. There are 3 default categories: (see above), but a new category may be returned.

Specified by:
getCategory in interface SystemHealthIndicator
Returns:
the category of this indicator

getType

public java.lang.String getType()
Get the type of this indicator. There are two valid types: TYPE_SYSTEM and TYPE_CUSTOM. WCB developers should use the latter.

Specified by:
getType in interface SystemHealthIndicator
Returns:
the type of this indicator

getId

public java.lang.String getId()

Specified by:
getId in interface SystemHealthIndicator
Returns:
a unique id

getMessage

public java.lang.String getMessage(java.util.Locale locale)
Get an explanatory message in the given language.

Specified by:
getMessage in interface SystemHealthIndicator
Parameters:
locale - the current locale
Returns:
explanation of what this indicator monitors

getName

public java.lang.String getName(java.util.Locale locale)
Get name of this performance indicator in the given language.

Specified by:
getName in interface SystemHealthIndicator
Parameters:
locale - the locale
Returns:
the indicators name

getValue

public java.lang.Object getValue()

Specified by:
getValue in interface SystemHealthIndicator
Returns:
the value of this indicator

getValueState

public SystemHealthIndicator.ValueStatus getValueState()

Specified by:
getValueState in interface SystemHealthIndicator
Returns:
the health state of the system that this indicator monitors

reset

public void reset()
Resets the indicator.

Specified by:
reset in interface SystemHealthIndicator


Copyright © 2007-2011 GX Software BV. All Rights Reserved.