Interface AmqpConnectionFactory

All Known Implementing Classes:
SingleInstanceAmqpConnectionFactory

public interface AmqpConnectionFactory
Represents a factory used to create Connection instances
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Check if the connection can or should be opened
    void
    close(boolean feedStopped)
    Close the AMQP connection
    com.rabbitmq.client.Connection
    Returns a Connection instance representing connection to the AMQP broker
    long
    Get the timestamp when the connection started
    boolean
    Check if the connection is currently alive
  • Method Details

    • getConnection

      com.rabbitmq.client.Connection getConnection() throws IOException, TimeoutException, NoSuchAlgorithmException, KeyManagementException
      Returns a Connection instance representing connection to the AMQP broker
      Returns:
      a Connection instance representing connection to the AMQP broker
      Throws:
      IOException - An error occurred while creating the connection instance
      TimeoutException - An error occurred while creating the connection instance
      NoSuchAlgorithmException - An error occurred while configuring the factory to use SSL
      KeyManagementException - An error occurred while configuring the factory to use SSL
    • close

      void close(boolean feedStopped) throws IOException
      Close the AMQP connection
      Parameters:
      feedStopped - indication if feed was stopped
      Throws:
      IOException - if the connection couldn't be terminated
    • isConnectionHealthy

      boolean isConnectionHealthy()
      Check if the connection is currently alive
      Returns:
      the status of the connection
    • getConnectionStarted

      long getConnectionStarted()
      Get the timestamp when the connection started
      Returns:
      the timestamp when the connection started
    • canConnectionOpen

      boolean canConnectionOpen()
      Check if the connection can or should be opened
      Returns:
      value indicating if the connection can or should be opened