public class DefaultBusinessServiceStateMachine extends Object implements BusinessServiceStateMachine
| Modifier and Type | Field and Description | 
|---|---|
static Status | 
MIN_SEVERITY  | 
| Constructor and Description | 
|---|
DefaultBusinessServiceStateMachine()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addHandler(BusinessServiceStateChangeHandler handler,
          Map<String,String> attributes)
Registers a state change handler. 
 | 
List<GraphVertex> | 
calculateImpact(Application application)  | 
List<GraphVertex> | 
calculateImpact(BusinessService businessService)  | 
List<GraphVertex> | 
calculateImpact(IpService ipService)  | 
List<GraphVertex> | 
calculateImpact(String reductionKey)  | 
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 the  
BusinessServiceStateMachine. | 
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. 
 | 
Status | 
getOperationalStatus(String reductionKey)
Retrieves the current operational status of a particular reduction key. 
 | 
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 tempFile)  | 
void | 
setAlarmProvider(AlarmProvider alarmProvider)  | 
void | 
setBusinessServices(List<BusinessService> businessServices)
Sets the list of Business Services that need to managed by the state machine. 
 | 
static List<StatusWithIndex> | 
weighEdges(Collection<GraphEdge> edges)  | 
static List<StatusWithIndex> | 
weighStatuses(Map<GraphEdge,Status> edgesWithStatus)
Apply the edges weights to the associated statuses set in the map,
 ignoring the actual status stored in the edge. 
 | 
public static final Status MIN_SEVERITY
public void setBusinessServices(List<BusinessService> businessServices)
BusinessServiceStateMachinesetBusinessServices in interface BusinessServiceStateMachinebusinessServices - list of services to managepublic void handleNewOrUpdatedAlarm(AlarmWrapper alarm)
BusinessServiceStateMachinehandleNewOrUpdatedAlarm in interface BusinessServiceStateMachinepublic void handleAllAlarms(List<AlarmWrapper> alarms)
BusinessServiceStateMachinehandleAllAlarms in interface BusinessServiceStateMachinepublic static List<StatusWithIndex> weighEdges(Collection<GraphEdge> edges)
public static List<StatusWithIndex> weighStatuses(Map<GraphEdge,Status> edgesWithStatus)
edgesWithStatus - public Status getOperationalStatus(BusinessService businessService)
BusinessServiceStateMachinegetOperationalStatus in interface BusinessServiceStateMachinebusinessService - Business Service to querypublic Status getOperationalStatus(IpService ipService)
BusinessServiceStateMachinegetOperationalStatus in interface BusinessServiceStateMachineipService - IP Service to querypublic Status getOperationalStatus(String reductionKey)
BusinessServiceStateMachinegetOperationalStatus in interface BusinessServiceStateMachinereductionKey - reduction key to query forpublic Status getOperationalStatus(Edge edge)
BusinessServiceStateMachineBusinessServiceStateMachine.getOperationalStatus(String),
 BusinessServiceStateMachine.getOperationalStatus(IpService) or BusinessServiceStateMachine.getOperationalStatus(BusinessService) depending
 on the type of the edge.
 This method DOES NOT return the mapped status of the edge.getOperationalStatus in interface BusinessServiceStateMachineedge - edge to query forpublic void setAlarmProvider(AlarmProvider alarmProvider)
public void addHandler(BusinessServiceStateChangeHandler handler, Map<String,String> attributes)
BusinessServiceStateMachineaddHandler in interface BusinessServiceStateMachinehandler - handler to registerattributes - map of service attributes, required for compatibility with the ONMS-OSGi bridge.public boolean removeHandler(BusinessServiceStateChangeHandler handler, Map<String,String> attributes)
BusinessServiceStateMachineremoveHandler in interface BusinessServiceStateMachinehandler - handler to unregisterattributes - map of service attributes, required for compatibility with the ONMS-OSGi bridge.public void renderGraphToPng(File tempFile)
renderGraphToPng in interface BusinessServiceStateMachinepublic BusinessServiceGraph getGraph()
BusinessServiceStateMachineBusinessServiceStateMachine.
 Please DO NOT MODIFY any object in that graph.getGraph in interface BusinessServiceStateMachineBusinessServiceStateMachine. DO NOT MODIFY!public Set<GraphEdge> calculateImpacting(BusinessService businessService)
calculateImpacting in interface BusinessServiceStateMachinepublic BusinessServiceStateMachine clone(boolean preserveState)
clone in interface BusinessServiceStateMachinepublic List<GraphVertex> calculateRootCause(BusinessService businessService)
calculateRootCause in interface BusinessServiceStateMachinepublic List<GraphVertex> calculateImpact(BusinessService businessService)
calculateImpact in interface BusinessServiceStateMachinepublic List<GraphVertex> calculateImpact(IpService ipService)
calculateImpact in interface BusinessServiceStateMachinepublic List<GraphVertex> calculateImpact(Application application)
calculateImpact in interface BusinessServiceStateMachinepublic List<GraphVertex> calculateImpact(String reductionKey)
calculateImpact in interface BusinessServiceStateMachinepublic ThresholdResultExplanation explain(BusinessService businessService, Threshold threshold)
explain in interface BusinessServiceStateMachineCopyright © 2020. All rights reserved.