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 Summary
Modifier and TypeMethodDescriptionvoid
addConnectionListener
(ConnectionListener listener) void
getHost()
int
getPort()
default ConnectionFactory
Return a separate connection factory for publishers (if implemented).default boolean
Return true if publisher confirms are enabled.default boolean
Return true if publisher returns are enabled.default boolean
Return true if simple publisher confirms are enabled.boolean
removeConnectionListener
(ConnectionListener listener) default void
Close any connection(s) that might be cached by this factory.
-
Method Details
-
createConnection
- Throws:
AmqpException
-
getHost
-
getPort
int getPort() -
getVirtualHost
String getVirtualHost() -
getUsername
String getUsername() -
addConnectionListener
-
removeConnectionListener
-
clearConnectionListeners
void clearConnectionListeners() -
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
-