org.springframework.amqp.rabbit.connection
Class AbstractConnectionFactory
java.lang.Object
org.springframework.amqp.rabbit.connection.AbstractConnectionFactory
- All Implemented Interfaces:
- ConnectionFactory, DisposableBean
- Direct Known Subclasses:
- CachingConnectionFactory, SingleConnectionFactory
public abstract class AbstractConnectionFactory
- extends Object
- implements ConnectionFactory, DisposableBean
- Author:
- Dave Syer
Field Summary |
protected org.apache.commons.logging.Log |
logger
|
Constructor Summary |
AbstractConnectionFactory(com.rabbitmq.client.ConnectionFactory rabbitConnectionFactory)
Create a new SingleConnectionFactory for the given target ConnectionFactory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final org.apache.commons.logging.Log logger
AbstractConnectionFactory
public AbstractConnectionFactory(com.rabbitmq.client.ConnectionFactory rabbitConnectionFactory)
- Create a new SingleConnectionFactory for the given target ConnectionFactory.
- Parameters:
rabbitConnectionFactory
- the target ConnectionFactory
setUsername
public void setUsername(String username)
setPassword
public void setPassword(String password)
setHost
public void setHost(String host)
getHost
public String getHost()
- Specified by:
getHost
in interface ConnectionFactory
setVirtualHost
public void setVirtualHost(String virtualHost)
getVirtualHost
public String getVirtualHost()
- Specified by:
getVirtualHost
in interface ConnectionFactory
setPort
public void setPort(int port)
getPort
public int getPort()
- Specified by:
getPort
in interface ConnectionFactory
getConnectionListener
protected ConnectionListener getConnectionListener()
- A composite connection listener to be used by subclasses when creating and closing connections.
- Returns:
- the connection listener
getChannelListener
protected ChannelListener getChannelListener()
- A composite channel listener to be used by subclasses when creating and closing channels.
- Returns:
- the channel listener
setConnectionListeners
public void setConnectionListeners(List<? extends ConnectionListener> listeners)
addConnectionListener
public void addConnectionListener(ConnectionListener listener)
- Specified by:
addConnectionListener
in interface ConnectionFactory
setChannelListeners
public void setChannelListeners(List<? extends ChannelListener> listeners)
addChannelListener
public void addChannelListener(ChannelListener listener)
createBareConnection
protected final Connection createBareConnection()
getDefaultHostName
protected final String getDefaultHostName()
destroy
public void destroy()
- Specified by:
destroy
in interface DisposableBean
Copyright © 2011. All Rights Reserved.