Class HeartbeatMonitor

java.lang.Object
org.axonframework.axonserver.connector.heartbeat.HeartbeatMonitor
All Implemented Interfaces:
org.axonframework.lifecycle.Lifecycle

@Deprecated public class HeartbeatMonitor extends Object implements org.axonframework.lifecycle.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

    org.axonframework.lifecycle.Lifecycle.LifecycleHandler, org.axonframework.lifecycle.Lifecycle.LifecycleRegistry
  • Constructor Summary

    Constructors
    Constructor
    Description
    HeartbeatMonitor(Runnable onInvalidConnection, ConnectionSanityChecker connectionSanityCheck, Scheduler scheduler, long initialDelay, long delay)
    Deprecated.
    Primary constructor of HeartbeatMonitor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    registerLifecycleHandlers(org.axonframework.lifecycle.Lifecycle.LifecycleRegistry lifecycle)
    Deprecated.
     
    void
    Deprecated.
    Stops the scheduled task and shutdown the monitor, that cannot be restarted again.
    void
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HeartbeatMonitor

      public HeartbeatMonitor(Runnable onInvalidConnection, ConnectionSanityChecker connectionSanityCheck, Scheduler scheduler, long initialDelay, long delay)
      Deprecated.
      Primary constructor of HeartbeatMonitor.
      Parameters:
      onInvalidConnection - callback to be call when the connection is no longer alive
      connectionSanityCheck - sanity check which allows to verify if the connection is alive
      scheduler - the Scheduler to use for scheduling the task
      initialDelay - the initial delay, in milliseconds
      delay - the scheduling period, in milliseconds
  • Method Details

    • registerLifecycleHandlers

      public void registerLifecycleHandlers(@Nonnull org.axonframework.lifecycle.Lifecycle.LifecycleRegistry lifecycle)
      Deprecated.
      Specified by:
      registerLifecycleHandlers in interface org.axonframework.lifecycle.Lifecycle
    • 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 phase Phase.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 phase Phase.INSTRUCTION_COMPONENTS.