public interface Connection extends AutoCloseable
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'. |
default void |
closeThreadChannel()
Close any channel associated with the current thread.
|
com.rabbitmq.client.Channel |
createChannel(boolean transactional)
Create a new channel, using an internally allocated channel number.
|
default com.rabbitmq.client.Connection |
getDelegate()
Return the underlying RabbitMQ connection.
|
int |
getLocalPort() |
boolean |
isOpen()
Flag to indicate the status of the connection.
|
boolean |
removeBlockedListener(com.rabbitmq.client.BlockedListener listener)
Remove a
BlockedListener . |
com.rabbitmq.client.Channel createChannel(boolean transactional) throws AmqpException
transactional
- true if the channel should support transactionsAmqpException
- if an I/O problem is encounteredvoid close() throws AmqpException
AMQP.REPLY_SUCCESS
close code
and message 'OK'.
Waits for all the close operations to complete.close
in interface AutoCloseable
AmqpException
- if an I/O problem is encounteredboolean isOpen()
int getLocalPort()
void addBlockedListener(com.rabbitmq.client.BlockedListener listener)
BlockedListener
.listener
- the listener to addConnection.addBlockedListener(BlockedListener)
boolean removeBlockedListener(com.rabbitmq.client.BlockedListener listener)
BlockedListener
.listener
- the listener to removetrue
if the listener was found and removed,
false
otherwiseConnection.removeBlockedListener(BlockedListener)
@Nullable default com.rabbitmq.client.Connection getDelegate()
default void closeThreadChannel()