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 String
getColor
(int status) Gets the color.Gets the comment.static long
getDelay()
Gets the delay.getName()
Gets the name.static MonitorInterface
Gets the provider.Gets the service.int
Gets the status.static boolean
Checks if is activated.static boolean
isDebug()
Checks if is debug.boolean
isGreen()
Checks if is green.boolean
isRed()
Checks if is red.boolean
isYellow()
Checks if is yellow.void
setComment
(String comment) Sets the comment.static void
setDebug
(boolean activated) Sets the debug.void
Sets the name.static void
setProvider
(MonitorInterface provider) Sets the provider.void
setService
(String service) Sets the service.void
setStatus
(int status) Sets the status.toString()
To string.void
update()
Update.void
update
(int status) Update.void
Update.void
Update.
-
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
-