Class MonitorManager
java.lang.Object
ecmwf.common.monitor.MonitorManager
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMonitorManager(String name, int status, String comment) Instantiates a new monitor manager.MonitorManager(String name, String service, int status, String comment) Instantiates a new monitor manager. -
Method Summary
Modifier and TypeMethodDescriptiongetColor()Gets the color.static StringgetColor(int status) Gets the color.Gets the comment.static longgetDelay()Gets the delay.getName()Gets the name.static MonitorInterfaceGets the provider.Gets the service.intGets the status.static booleanChecks if is activated.static booleanisDebug()Checks if is debug.booleanisGreen()Checks if is green.booleanisRed()Checks if is red.booleanisYellow()Checks if is yellow.voidsetComment(String comment) Sets the comment.static voidsetDebug(boolean activated) Sets the debug.voidSets the name.static voidsetProvider(MonitorInterface provider) Sets the provider.voidsetService(String service) Sets the service.voidsetStatus(int status) Sets the status.toString()To string.voidupdate()Update.voidupdate(int status) Update.voidUpdate.voidUpdate.
-
Field Details
-
GREEN
public static final int GREENThe Constant GREEN.- See Also:
-
YELLOW
public static final int YELLOWThe Constant YELLOW.- See Also:
-
RED
public static final int REDThe Constant RED.- See Also:
-
BLUE
public static final int BLUEThe Constant BLUE.- See Also:
-
-
Constructor Details
-
MonitorManager
public MonitorManager(String name, String service, int status, String comment) throws MonitorException Instantiates a new monitor manager.- Parameters:
name- the nameservice- the servicestatus- the statuscomment- the comment- Throws:
MonitorException- the monitor exception
-
MonitorManager
Instantiates a new monitor manager. No default service, it must be provided during the subscription.- Parameters:
name- the namestatus- the statuscomment- the comment- Throws:
MonitorException- the monitor exception
-
-
Method Details
-
setProvider
Sets the provider.- Parameters:
provider- the new provider
-
getProvider
-
getColor
Gets the color.- Parameters:
status- the status- Returns:
- the color
- Throws:
MonitorException- the monitor exception
-
update
Update.- Parameters:
status- the statuscomment- the comment- Throws:
MonitorException- the monitor exception
-
update
Update.- Parameters:
status- the status- Throws:
MonitorException- the monitor exception
-
update
Update.- Parameters:
comment- the comment- Throws:
MonitorException- the monitor exception
-
update
Update.- Throws:
MonitorException- the monitor exception
-
getComment
-
setComment
-
getStatus
public int getStatus()Gets the status.- Returns:
- the status
-
getColor
-
toString
-
setStatus
Sets the status.- Parameters:
status- the new status- Throws:
MonitorException- the monitor exception
-
getName
-
setName
-
getService
-
setService
-
isActivated
public static boolean isActivated()Checks if is activated.- Returns:
- true, if is activated
-
isDebug
public static boolean isDebug()Checks if is debug.- Returns:
- true, if is debug
-
setDebug
public static void setDebug(boolean activated) Sets the debug.- Parameters:
activated- the new debug
-
getDelay
public static long getDelay()Gets the delay.- Returns:
- the delay
-
isGreen
public boolean isGreen()Checks if is green.- Returns:
- true, if is green
-
isRed
public boolean isRed()Checks if is red.- Returns:
- true, if is red
-
isYellow
public boolean isYellow()Checks if is yellow.- Returns:
- true, if is yellow
-