Class CompositeIncidentHandler
java.lang.Object
org.camunda.bpm.engine.impl.incident.CompositeIncidentHandler
- All Implemented Interfaces:
IncidentHandler
A composite incident handler that handles incidents of a certain type by the multiple handlers. The result of handling depends on main handler.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCompositeIncidentHandler(IncidentHandler mainIncidentHandler, List<IncidentHandler> incidentHandlers) Constructor that takes a list ofIncidentHandlerthat consume the incident.CompositeIncidentHandler(IncidentHandler mainIncidentHandler, IncidentHandler... incidentHandlers) Constructor that takes a varargs parameterIncidentHandlerthat consume the incident. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(IncidentHandler incidentHandler) Adds theIncidentHandlerto the list ofIncidentHandlerthat consume the incident.voiddeleteIncident(IncidentContext context) Called in situations in which an incident handler may wish to delete existing incidents Example: when a scope is ended or a job is deleted.Returns the incident type this handler activates for.handleIncident(IncidentContext context, String message) Handle an incident that arose in the context of an execution.protected voidinitializeIncidentsHandlers(IncidentHandler mainIncidentHandler, List<IncidentHandler> incidentHandlers) InitializeincidentHandlerswith data transfered from constructorvoidresolveIncident(IncidentContext context) Called in situations in which an incident handler may wish to resolve existing incidents The implementation receives this callback to enable it to resolve any open incidents that may exist.
-
Field Details
-
mainIncidentHandler
-
incidentHandlers
-
-
Constructor Details
-
CompositeIncidentHandler
public CompositeIncidentHandler(IncidentHandler mainIncidentHandler, List<IncidentHandler> incidentHandlers) Constructor that takes a list ofIncidentHandlerthat consume the incident.- Parameters:
mainIncidentHandler- the main incident handlerIncidentHandlerthat consume the incident and return result.incidentHandlers- the list ofIncidentHandlerthat consume the incident.
-
CompositeIncidentHandler
public CompositeIncidentHandler(IncidentHandler mainIncidentHandler, IncidentHandler... incidentHandlers) Constructor that takes a varargs parameterIncidentHandlerthat consume the incident.- Parameters:
mainIncidentHandler- the main incident handlerIncidentHandlerthat consume the incident and return result.incidentHandlers- the list ofIncidentHandlerthat consume the incident.
-
-
Method Details
-
initializeIncidentsHandlers
protected void initializeIncidentsHandlers(IncidentHandler mainIncidentHandler, List<IncidentHandler> incidentHandlers) InitializeincidentHandlerswith data transfered from constructor- Parameters:
incidentHandlers-
-
add
Adds theIncidentHandlerto the list ofIncidentHandlerthat consume the incident.- Parameters:
incidentHandler- theIncidentHandlerthat consume the incident.
-
getIncidentHandlerType
Description copied from interface:IncidentHandlerReturns the incident type this handler activates for.- Specified by:
getIncidentHandlerTypein interfaceIncidentHandler
-
handleIncident
Description copied from interface:IncidentHandlerHandle an incident that arose in the context of an execution.- Specified by:
handleIncidentin interfaceIncidentHandler
-
resolveIncident
Description copied from interface:IncidentHandlerCalled in situations in which an incident handler may wish to resolve existing incidents The implementation receives this callback to enable it to resolve any open incidents that may exist.- Specified by:
resolveIncidentin interfaceIncidentHandler
-
deleteIncident
Description copied from interface:IncidentHandlerCalled in situations in which an incident handler may wish to delete existing incidents Example: when a scope is ended or a job is deleted. The implementation receives this callback to enable it to delete any open incidents that may exist.- Specified by:
deleteIncidentin interfaceIncidentHandler
-