Interface AmqpConnectionFactory
- All Known Implementing Classes:
SingleInstanceAmqpConnectionFactory
public interface AmqpConnectionFactory
Represents a factory used to create
Connection instances-
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if the connection can or should be openedvoidclose(boolean feedStopped) Close the AMQP connectioncom.rabbitmq.client.ConnectionReturns aConnectioninstance representing connection to the AMQP brokerlongGet the timestamp when the connection startedbooleanCheck if the connection is currently alive
-
Method Details
-
getConnection
com.rabbitmq.client.Connection getConnection() throws IOException, TimeoutException, NoSuchAlgorithmException, KeyManagementExceptionReturns aConnectioninstance representing connection to the AMQP broker- Returns:
- a
Connectioninstance representing connection to the AMQP broker - Throws:
IOException- An error occurred while creating the connection instanceTimeoutException- An error occurred while creating the connection instanceNoSuchAlgorithmException- An error occurred while configuring the factory to use SSLKeyManagementException- An error occurred while configuring the factory to use SSL
-
close
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
-