public class SimpleConnection extends java.lang.Object implements Connection, com.rabbitmq.client.impl.NetworkConnection
| Constructor and Description | 
|---|
SimpleConnection(com.rabbitmq.client.Connection delegate,
                int closeTimeout)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addBlockedListener(com.rabbitmq.client.BlockedListener listener)
Add a  
BlockedListener. | 
void | 
close()
Close this connection and all its channels
 with the  
AMQP.REPLY_SUCCESS close code
 and message 'OK'. | 
com.rabbitmq.client.Channel | 
createChannel(boolean transactional)
Create a new channel, using an internally allocated channel number. 
 | 
java.net.InetAddress | 
getAddress()  | 
com.rabbitmq.client.Connection | 
getDelegate()
Return the underlying RabbitMQ connection. 
 | 
java.net.InetAddress | 
getLocalAddress()  | 
int | 
getLocalPort()  | 
int | 
getPort()  | 
boolean | 
isOpen()
True if the connection is open. 
 | 
boolean | 
removeBlockedListener(com.rabbitmq.client.BlockedListener listener)
Remove a  
BlockedListener. | 
java.lang.String | 
toString()  | 
public SimpleConnection(com.rabbitmq.client.Connection delegate,
                        int closeTimeout)
public com.rabbitmq.client.Channel createChannel(boolean transactional)
ConnectioncreateChannel in interface Connectiontransactional - true if the channel should support transactionspublic void close()
ConnectionAMQP.REPLY_SUCCESS close code
 and message 'OK'.
 Waits for all the close operations to complete.close in interface java.lang.AutoCloseableclose in interface Connectionpublic boolean isOpen()
isOpen in interface ConnectionAutoRecoverConnectionNotCurrentlyOpenException - if the connection is an
 AutorecoveringConnection and is currently closed; this is required to
 prevent the CachingConnectionFactory from discarding this connection
 and opening a new one, in which case the "old" connection would eventually be recovered
 and orphaned - also any consumers belonging to it might be recovered too
 and the broker will deliver messages to them when there is no code actually running
 to deal with those messages (when using the SimpleMessageListenerContainer).
 If we have actually closed the connection
 (e.g. via CachingConnectionFactory.resetConnection()) this will return false.public int getLocalPort()
getLocalPort in interface com.rabbitmq.client.impl.NetworkConnectiongetLocalPort in interface Connectionpublic void addBlockedListener(com.rabbitmq.client.BlockedListener listener)
ConnectionBlockedListener.addBlockedListener in interface Connectionlistener - the listener to addConnection.addBlockedListener(BlockedListener)public boolean removeBlockedListener(com.rabbitmq.client.BlockedListener listener)
ConnectionBlockedListener.removeBlockedListener in interface Connectionlistener - the listener to removetrue if the listener was found and removed,
 false otherwiseConnection.removeBlockedListener(BlockedListener)public java.net.InetAddress getLocalAddress()
getLocalAddress in interface com.rabbitmq.client.impl.NetworkConnectionpublic java.net.InetAddress getAddress()
getAddress in interface com.rabbitmq.client.impl.NetworkConnectionpublic int getPort()
getPort in interface com.rabbitmq.client.impl.NetworkConnectionpublic com.rabbitmq.client.Connection getDelegate()
ConnectiongetDelegate in interface Connectionpublic java.lang.String toString()
toString in class java.lang.Object