|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.datapower.wamt.OperationStatus
public class OperationStatus
This class defines valid values tracking the operation status of elements such as domains, and containers to hold these values. It also provides helper methods for aggregation of operation status to higher levels (i.e., a single value for a device or managed set). The color mapping for these states could be "up=green", "partial=yellow", "unknown=grey", "down=red".
An OperationStatus has no function. Setting its value does not accomplish anything. The OperationStatus is set by the heartbeat daemon and other tasks that probe the device for the operation status of domains. The OperationStatus is to be used for display only. The manager does not manage the operation status, except for the manually-initiated ability to stop and start domains. The manager only reads the domain status from the device.
Inside the device, individual configuration objects (all the way from domains to match rules and below) have an op-state , which is an abbreviation for "operation state". The two valid values inside the device for the op-state are "enabled" and "disabled". A "disabled" op-state could be caused by manually disabling a configuration object, or it could be caused by error such as a network port conflict or a missing required file resource for a configuration object. The device also provides the op-state setting for a domain - disabling a domain disables all the services in that domain.
AMP provides a way to query the device for the operation status of a domain, which is not the boolean enabled/disabled op-state of the domain configuration object itself, but instead is a rollup of the op-states of all the services in the domain - this means that the rollup of all the services could result in a non-boolean value such as "partial".
Although the device native op-state can refer to any configuration object, the OperationStatus refers only to domains. OperationStatus does not apply to firmware or settings.
This class will be used both by the clientAPI (task-level API) and the device communication layer (AMP). Consumers of the clientAPI should treat these objects as read-only, and invoke only the gettr methods. The only threads to call the settr methods should be internal threads.
Nested Class Summary | |
---|---|
static class |
OperationStatus.Enumerated
This holds the enumerated values that are allowed to be used with OperationStatus . |
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT_2009_2013
|
Constructor Summary | |
---|---|
OperationStatus(OperationStatus.Enumerated currentStatus)
Create a status object that can hold an enumerated state. |
Method Summary | |
---|---|
java.lang.String |
getDisplayName()
Get a human-readable name that represents the current OperationStatus object. |
java.lang.String |
getDisplayName(java.util.Locale locale)
Get a human-readable name that represents the current OperationStatus object. |
java.lang.String |
getDisplayNameKey()
Get a key that represents the description of the current OperationStatus object. |
OperationStatus.Enumerated |
getEnumerated()
Retrieve the enumerated current status. |
boolean |
isDown()
Since the status can be one of four values, this method checks if the status has the "down" value. |
boolean |
isPartiallyUp()
Since the status can be one of four values, this method checks if the status has the enumerated "partial" value. |
boolean |
isUnknown()
Since the status can be one of four values, this method checks if the status has the enumerated "unknown" value. |
boolean |
isUp()
Since the status can be one of four values, this method checks if the status has the enumerated "up" value. |
void |
rollupFrom(OperationStatus[] lowerLevelStati)
This contains the logic to walk through multiple lower-level status values to determine what the aggregated higher-level status value is. |
void |
setStatus(OperationStatus.Enumerated newStatus)
Set the value of this status object to the new enumerated value. |
static OperationStatus[] |
toOperationStatusArray(java.util.Collection operationStatusCollection)
Convert a collection to an array. |
java.lang.String |
toString()
Get a String representation of this object for the purpose of debugging or tracing or for a user interface. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT_2009_2013
Constructor Detail |
---|
public OperationStatus(OperationStatus.Enumerated currentStatus)
currentStatus
- the enumerated current status.Method Detail |
---|
public void setStatus(OperationStatus.Enumerated newStatus)
public
access modifier because it needs to be invoked from
multiple packages.
newStatus
- the enumerated new statuspublic OperationStatus.Enumerated getEnumerated()
public boolean isUp()
isPartiallyUp()
,
isDown()
,
isUnknown()
public boolean isPartiallyUp()
isUp()
,
isDown()
,
isUnknown()
public boolean isUnknown()
isUp()
,
isDown()
,
isPartiallyUp()
public boolean isDown()
isUp()
,
isPartiallyUp()
,
isUnknown()
public void rollupFrom(OperationStatus[] lowerLevelStati)
A bottom-level element will have status of either up or down or unknown. A higher-level status is defined as an aggregation of multiple lower-level status items. If all the lower-level status are "up", then the higher-level status is "up" also. If all the lower-level status are "down", then the higher-level status is "down" also. If all the lower-level status are "unknown", then the higher-level status is also "unknown". If there is a mix of "up" and "down" and possibly "unknown" status in the lower-level, then the higher-level status is "partial". The color mapping for these states could be "up=green", "partial=yellow", "unknown=grey", "down=red".
lowerLevelStati
- the lower-level status items to merge into the
aggregated higher-level status that the this
object
represents.public static OperationStatus[] toOperationStatusArray(java.util.Collection operationStatusCollection)
rollupFrom(OperationStatus[])
method takes an array as a
parameter, this method may be helpful for converting from an intermediate
collection to a type which you can call that method.
operationStatusCollection
- a collection that contains
OperationStatus objects.
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getDisplayNameKey()
public java.lang.String getDisplayName()
public java.lang.String getDisplayName(java.util.Locale locale)
locale
- The locale to be used in getting the human-readable name
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |