Class HeartbeatMonitor
java.lang.Object
org.axonframework.axonserver.connector.heartbeat.HeartbeatMonitor
- All Implemented Interfaces:
Lifecycle
Deprecated.
in through use of the AxonServer java
connector
Verifies if the connection is still alive, and react if it is not.
- Since:
- 4.2.1
- Author:
- Sara Pellegrini
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.axonframework.lifecycle.Lifecycle
Lifecycle.LifecycleHandler, Lifecycle.LifecycleRegistry -
Constructor Summary
ConstructorsConstructorDescriptionHeartbeatMonitor(Runnable onInvalidConnection, ConnectionSanityChecker connectionSanityCheck, Scheduler scheduler, long initialDelay, long delay) Deprecated.Primary constructor ofHeartbeatMonitor. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Registers the activities to be executed in the various phases of an application's lifecycle.voidshutdown()Deprecated.Stops the scheduled task and shutdown the monitor, that cannot be restarted again.voidstart()Deprecated.Schedule a task that verifies that the connection is still alive and, if it is not, invoke a callback in order to react to the disconnection.
-
Constructor Details
-
HeartbeatMonitor
public HeartbeatMonitor(Runnable onInvalidConnection, ConnectionSanityChecker connectionSanityCheck, Scheduler scheduler, long initialDelay, long delay) Deprecated.Primary constructor ofHeartbeatMonitor.- Parameters:
onInvalidConnection- callback to be call when the connection is no longer aliveconnectionSanityCheck- sanity check which allows to verify if the connection is alivescheduler- theSchedulerto use for scheduling the taskinitialDelay- the initial delay, in millisecondsdelay- the scheduling period, in milliseconds
-
-
Method Details
-
registerLifecycleHandlers
Deprecated.Description copied from interface:LifecycleRegisters the activities to be executed in the various phases of an application's lifecycle. This could either be at startup, shutdown, or both.- Specified by:
registerLifecycleHandlersin interfaceLifecycle- Parameters:
lifecycle- the lifecycle instance to register the handlers with- See Also:
-
start
public void start()Deprecated.Schedule a task that verifies that the connection is still alive and, if it is not, invoke a callback in order to react to the disconnection. Started in phasePhase.INSTRUCTION_COMPONENTS, as this means all inbound and outbound connections have been started. -
shutdown
public void shutdown()Deprecated.Stops the scheduled task and shutdown the monitor, that cannot be restarted again. Shuts down in phasePhase.INSTRUCTION_COMPONENTS.
-