Package org.opennms.netmgt.bsm.service
Interface BusinessServiceStateMachine
-
- All Known Implementing Classes:
DefaultBusinessServiceStateMachine
public interface BusinessServiceStateMachine
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addHandler(BusinessServiceStateChangeHandler handler, java.util.Map<java.lang.String,java.lang.String> attributes)
Registers a state change handler.java.util.List<GraphVertex>
calculateImpact(java.lang.String reductionKey)
java.util.List<GraphVertex>
calculateImpact(Application application)
java.util.List<GraphVertex>
calculateImpact(BusinessService businessService)
java.util.List<GraphVertex>
calculateImpact(IpService ipService)
java.util.Set<GraphEdge>
calculateImpacting(BusinessService businessService)
java.util.List<GraphVertex>
calculateRootCause(BusinessService businessService)
BusinessServiceStateMachine
clone(boolean preserveState)
ThresholdResultExplanation
explain(BusinessService businessService, Threshold threshold)
BusinessServiceGraph
getGraph()
This returns the actual graph of theBusinessServiceStateMachine
.Status
getOperationalStatus(java.lang.String reductionKey)
Retrieves the current operational status of a particular reduction key.Status
getOperationalStatus(BusinessService businessService)
Retrieves the current operational status of a Business Service.Status
getOperationalStatus(Edge edge)
Retrieves the current operational status of the element associated with a particular Edge.Status
getOperationalStatus(IpService ipService)
Retrieves the current operational status of a particular IP service.void
handleAllAlarms(java.util.List<AlarmWrapper> alarms)
Updates the states of the Business Services using the given list of alarms.void
handleNewOrUpdatedAlarm(AlarmWrapper alarm)
Updates the states of the Business Services.boolean
removeHandler(BusinessServiceStateChangeHandler handler, java.util.Map<java.lang.String,java.lang.String> attributes)
Unregisters a state change handler.void
renderGraphToPng(java.io.File target)
void
setBusinessServices(java.util.List<BusinessService> businessServices)
Sets the list of Business Services that need to managed by the state machine.
-
-
-
Method Detail
-
setBusinessServices
void setBusinessServices(java.util.List<BusinessService> businessServices)
Sets the list of Business Services that need to managed by the state machine.- Parameters:
businessServices
- list of services to manage
-
getOperationalStatus
Status getOperationalStatus(BusinessService businessService)
Retrieves the current operational status of a Business Service.- Parameters:
businessService
- Business Service to query- Returns:
- the current operational status, or null if the Business Service if not managed by the state machine
-
getOperationalStatus
Status getOperationalStatus(IpService ipService)
Retrieves the current operational status of a particular IP service.- Parameters:
ipService
- IP Service to query- Returns:
- the current operational status, or null if the IP Service is not monitored by the state machine
-
getOperationalStatus
Status getOperationalStatus(java.lang.String reductionKey)
Retrieves the current operational status of a particular reduction key.- Parameters:
reductionKey
- reduction key to query for- Returns:
- the current operational status, or null if the Reduction Key is not monitored by the state machine
-
getOperationalStatus
Status getOperationalStatus(Edge edge)
Retrieves the current operational status of the element associated with a particular Edge. A call to this method is equal to a call togetOperationalStatus(String)
,getOperationalStatus(IpService)
orgetOperationalStatus(BusinessService)
depending on the type of the edge. This method DOES NOT return the mapped status of the edge.- Parameters:
edge
- edge to query for- Returns:
- the current operational status, or null if the Edge is not monitored by the state machine
-
handleNewOrUpdatedAlarm
void handleNewOrUpdatedAlarm(AlarmWrapper alarm)
Updates the states of the Business Services.
-
handleAllAlarms
void handleAllAlarms(java.util.List<AlarmWrapper> alarms)
Updates the states of the Business Services using the given list of alarms. The given list of alarms is expected to be the complete set of current alarms, and any alarms missing from this list will be treated as not being present.
-
addHandler
void addHandler(BusinessServiceStateChangeHandler handler, java.util.Map<java.lang.String,java.lang.String> attributes)
Registers a state change handler.- Parameters:
handler
- handler to registerattributes
- map of service attributes, required for compatibility with the ONMS-OSGi bridge.
-
removeHandler
boolean removeHandler(BusinessServiceStateChangeHandler handler, java.util.Map<java.lang.String,java.lang.String> attributes)
Unregisters a state change handler.- Parameters:
handler
- handler to unregisterattributes
- map of service attributes, required for compatibility with the ONMS-OSGi bridge.- Returns:
- true of the handler was previously registered, and false otherwise
-
renderGraphToPng
void renderGraphToPng(java.io.File target)
-
getGraph
BusinessServiceGraph getGraph()
This returns the actual graph of theBusinessServiceStateMachine
. Please DO NOT MODIFY any object in that graph.- Returns:
- the actual graph of the
BusinessServiceStateMachine
. DO NOT MODIFY!
-
clone
BusinessServiceStateMachine clone(boolean preserveState)
-
calculateRootCause
java.util.List<GraphVertex> calculateRootCause(BusinessService businessService)
-
calculateImpacting
java.util.Set<GraphEdge> calculateImpacting(BusinessService businessService)
-
calculateImpact
java.util.List<GraphVertex> calculateImpact(BusinessService businessService)
-
calculateImpact
java.util.List<GraphVertex> calculateImpact(IpService ipService)
-
calculateImpact
java.util.List<GraphVertex> calculateImpact(java.lang.String reductionKey)
-
calculateImpact
java.util.List<GraphVertex> calculateImpact(Application application)
-
explain
ThresholdResultExplanation explain(BusinessService businessService, Threshold threshold)
-
-