Interface ConnectionFactory

All Known Implementing Classes:
AbstractConnectionFactory, AbstractRoutingConnectionFactory, CachingConnectionFactory, LocalizedQueueConnectionFactory, PooledChannelConnectionFactory, SimpleRoutingConnectionFactory, ThreadChannelConnectionFactory

public interface ConnectionFactory
An interface based ConnectionFactory for creating Connections.

NOTE: The Rabbit API contains a ConnectionFactory class (same name).

Author:
Mark Fisher, Dave Syer, Gary Russell
  • Method Details

    • createConnection

      Connection createConnection() throws AmqpException
      Throws:
      AmqpException
    • getHost

      @Nullable String getHost()
    • getPort

      int getPort()
    • getVirtualHost

      String getVirtualHost()
    • getUsername

      String getUsername()
    • addConnectionListener

      void addConnectionListener(ConnectionListener listener)
    • removeConnectionListener

      boolean removeConnectionListener(ConnectionListener listener)
    • clearConnectionListeners

      void clearConnectionListeners()
    • getPublisherConnectionFactory

      @Nullable default ConnectionFactory getPublisherConnectionFactory()
      Return a separate connection factory for publishers (if implemented).
      Returns:
      the publisher connection factory, or null.
      Since:
      2.0.2
    • isSimplePublisherConfirms

      default boolean isSimplePublisherConfirms()
      Return true if simple publisher confirms are enabled.
      Returns:
      simplePublisherConfirms
      Since:
      2.1
    • isPublisherConfirms

      default boolean isPublisherConfirms()
      Return true if publisher confirms are enabled.
      Returns:
      publisherConfirms.
      Since:
      2.1
    • isPublisherReturns

      default boolean isPublisherReturns()
      Return true if publisher returns are enabled.
      Returns:
      publisherReturns.
      Since:
      2.1
    • resetConnection

      default void resetConnection()
      Close any connection(s) that might be cached by this factory. This does not prevent new connections from being opened.
      Since:
      2.4.4