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, Map<String,String> attributes)
Registers a state change handler.List<GraphVertex>
calculateImpact(String reductionKey)
List<GraphVertex>
calculateImpact(Application application)
List<GraphVertex>
calculateImpact(BusinessService businessService)
List<GraphVertex>
calculateImpact(IpService ipService)
Set<GraphEdge>
calculateImpacting(BusinessService businessService)
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(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(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, Map<String,String> attributes)
Unregisters a state change handler.void
renderGraphToPng(File target)
void
setBusinessServices(List<BusinessService> businessServices)
Sets the list of Business Services that need to managed by the state machine.
-
-
-
Method Detail
-
setBusinessServices
void setBusinessServices(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(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(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, Map<String,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, Map<String,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(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
List<GraphVertex> calculateRootCause(BusinessService businessService)
-
calculateImpacting
Set<GraphEdge> calculateImpacting(BusinessService businessService)
-
calculateImpact
List<GraphVertex> calculateImpact(BusinessService businessService)
-
calculateImpact
List<GraphVertex> calculateImpact(IpService ipService)
-
calculateImpact
List<GraphVertex> calculateImpact(String reductionKey)
-
calculateImpact
List<GraphVertex> calculateImpact(Application application)
-
explain
ThresholdResultExplanation explain(BusinessService businessService, Threshold threshold)
-
-