Interface Connection

All Known Subinterfaces:
DatasourceConnection
All Known Implementing Classes:
BaseConnection, DatasourceConnectionV2Host

public interface Connection
Provides methods for establishing, monitoring and disabling connections to external systems. The external system may be a connector datasource (and therefore an DatasourceConnection) or the Seeq Server (SeeqConnection).
  • Method Details

    • initialize

      void initialize()
      Initializes a connection, attempting to connect if enabled.
    • destroy

      void destroy()
      Disconnects from external systems and kills the monitoring thread.
    • getConnectionMessage

      String getConnectionMessage()
      A summary of the connection status, including any connection failure reason.
      Returns:
      summary of the connection status, including any connection failure reason.
    • getMinReconnectDelay

      Duration getMinReconnectDelay()
      Time to wait before reconnecting. Default is 5 seconds. There is an "exponential backoff" algorithm at play that will increase the reconnect delay as repeated attempts fail. That's why this is the minimum delay.
      Returns:
      minimum reconnect delay
    • setMinReconnectDelay

      void setMinReconnectDelay(Duration value)
      Time to wait before reconnecting. Default is 5 seconds. There is an "exponential backoff" algorithm at play that will increase the reconnect delay as repeated attempts fail. That's why this is the minimum delay.
      Parameters:
      value - minimum reconnect delay
    • getMaxReconnectDelay

      Duration getMaxReconnectDelay()
      Maximum time to delay a reconnect attempt. Default is 5 minutes. There is an "exponential backoff" algorithm at play that will increase the reconnect delay as repeated attempts fail.
      Returns:
      maximum reconnect delay
    • setMaxReconnectDelay

      void setMaxReconnectDelay(Duration value)
      Maximum time to delay a reconnect attempt. Default is 5 minutes. There is an "exponential backoff" algorithm at play that will increase the reconnect delay as repeated attempts fail.
      Parameters:
      value - maximum reconnect delay
    • getState

      The current state of the connection.
      Returns:
      state of the connection
    • getStateChangedEvent

      Event<Connection.StateChangedEventArgs> getStateChangedEvent()
      Event for state changes of the connection.
      Returns:
      the state changed event
    • enable

      void enable()
      Enable connection and call the connect() method. The connection will pass through a Connecting state first.
    • disable

      void disable()
      Disable connections to the server. This calls the disconnect() method in the derived class. Reconnections will not occur if/until a Connect() call is made.
    • getMonitorPeriod

      Duration getMonitorPeriod()
      Time between testing of the connection vitality. Default should be 5 seconds.
      Returns:
      the monitor period
    • setMonitorPeriod

      void setMonitorPeriod(Duration value)
      Time between testing of the connection vitality. Default should be 5 seconds.
      Parameters:
      value - - the new monitor period