Interface ConnectionFactory
-
- All Known Implementing Classes:
AbstractConnectionFactory
,AbstractRoutingConnectionFactory
,CachingConnectionFactory
,LocalizedQueueConnectionFactory
,PooledChannelConnectionFactory
,SimpleRoutingConnectionFactory
,ThreadChannelConnectionFactory
public interface ConnectionFactory
An interface based ConnectionFactory for creatingConnections
.NOTE: The Rabbit API contains a ConnectionFactory class (same name).
- Author:
- Mark Fisher, Dave Syer, Gary Russell
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
addConnectionListener(ConnectionListener listener)
void
clearConnectionListeners()
Connection
createConnection()
String
getHost()
int
getPort()
default ConnectionFactory
getPublisherConnectionFactory()
Return a separate connection factory for publishers (if implemented).String
getUsername()
String
getVirtualHost()
default boolean
isPublisherConfirms()
Return true if publisher confirms are enabled.default boolean
isPublisherReturns()
Return true if publisher returns are enabled.default boolean
isSimplePublisherConfirms()
Return true if simple publisher confirms are enabled.boolean
removeConnectionListener(ConnectionListener listener)
-
-
-
Method Detail
-
createConnection
Connection createConnection() throws AmqpException
- Throws:
AmqpException
-
getHost
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
-
-