Package io.debezium.server
Class ConnectorLifecycle
- java.lang.Object
-
- io.debezium.server.ConnectorLifecycle
-
- All Implemented Interfaces:
DebeziumEngine.CompletionCallback,DebeziumEngine.ConnectorCallback,org.eclipse.microprofile.health.HealthCheck
@Liveness @ApplicationScoped public class ConnectorLifecycle extends Object implements org.eclipse.microprofile.health.HealthCheck, DebeziumEngine.ConnectorCallback, DebeziumEngine.CompletionCallback
The server lifecycle listener that published CDI events based on the lifecycle changes and also provides Microprofile Health information.- Author:
- Jiri Pechanec
-
-
Field Summary
Fields Modifier and Type Field Description (package private) javax.enterprise.event.Event<ConnectorCompletedEvent>connectorCompletedEvent(package private) javax.enterprise.event.Event<ConnectorStartedEvent>connectorStartedEvent(package private) javax.enterprise.event.Event<ConnectorStoppedEvent>connectorStoppedEventprivate booleanliveprivate static org.slf4j.LoggerLOGGER(package private) javax.enterprise.event.Event<TaskStartedEvent>taskStartedEvent(package private) javax.enterprise.event.Event<TaskStoppedEvent>taskStoppedEvent
-
Constructor Summary
Constructors Constructor Description ConnectorLifecycle()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.microprofile.health.HealthCheckResponsecall()voidconnectorStarted()voidconnectorStopped()voidhandle(boolean success, String message, Throwable error)voidtaskStarted()voidtaskStopped()
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
live
private volatile boolean live
-
connectorStartedEvent
@Inject javax.enterprise.event.Event<ConnectorStartedEvent> connectorStartedEvent
-
connectorStoppedEvent
@Inject javax.enterprise.event.Event<ConnectorStoppedEvent> connectorStoppedEvent
-
taskStartedEvent
@Inject javax.enterprise.event.Event<TaskStartedEvent> taskStartedEvent
-
taskStoppedEvent
@Inject javax.enterprise.event.Event<TaskStoppedEvent> taskStoppedEvent
-
connectorCompletedEvent
@Inject javax.enterprise.event.Event<ConnectorCompletedEvent> connectorCompletedEvent
-
-
Method Detail
-
connectorStarted
public void connectorStarted()
- Specified by:
connectorStartedin interfaceDebeziumEngine.ConnectorCallback
-
connectorStopped
public void connectorStopped()
- Specified by:
connectorStoppedin interfaceDebeziumEngine.ConnectorCallback
-
taskStarted
public void taskStarted()
- Specified by:
taskStartedin interfaceDebeziumEngine.ConnectorCallback
-
taskStopped
public void taskStopped()
- Specified by:
taskStoppedin interfaceDebeziumEngine.ConnectorCallback
-
handle
public void handle(boolean success, String message, Throwable error)- Specified by:
handlein interfaceDebeziumEngine.CompletionCallback
-
call
public org.eclipse.microprofile.health.HealthCheckResponse call()
- Specified by:
callin interfaceorg.eclipse.microprofile.health.HealthCheck
-
-