public class IdempotentClosedConnection extends Object implements Connection
Connection
that ensure closing is idempotent.
It is used internally to share the same AMQP connection between
Sender
and Receiver
instances, e.g. to use exclusive
resources.Constructor and Description |
---|
IdempotentClosedConnection(Connection delegate) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
openChannel, openChannel
public IdempotentClosedConnection(Connection delegate)
public Connection getDelegate()
public InetAddress getAddress()
getAddress
in interface Connection
public int getPort()
getPort
in interface Connection
public int getChannelMax()
getChannelMax
in interface Connection
public int getFrameMax()
getFrameMax
in interface Connection
public int getHeartbeat()
getHeartbeat
in interface Connection
public Map<String,Object> getClientProperties()
getClientProperties
in interface Connection
@Nullable public String getClientProvidedName()
getClientProvidedName
in interface Connection
public Map<String,Object> getServerProperties()
getServerProperties
in interface Connection
@Nullable public Channel createChannel() throws IOException
createChannel
in interface Connection
IOException
@Nullable public Channel createChannel(int channelNumber) throws IOException
createChannel
in interface Connection
IOException
public void close() throws IOException
close
in interface Connection
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void close(int closeCode, String closeMessage) throws IOException
close
in interface Connection
IOException
public void close(int timeout) throws IOException
close
in interface Connection
IOException
public void close(int closeCode, String closeMessage, int timeout) throws IOException
close
in interface Connection
IOException
public void abort()
abort
in interface Connection
public void abort(int closeCode, String closeMessage)
abort
in interface Connection
public void abort(int timeout)
abort
in interface Connection
public void abort(int closeCode, String closeMessage, int timeout)
abort
in interface Connection
public void addBlockedListener(BlockedListener listener)
addBlockedListener
in interface Connection
public BlockedListener addBlockedListener(BlockedCallback blockedCallback, UnblockedCallback unblockedCallback)
addBlockedListener
in interface Connection
public boolean removeBlockedListener(BlockedListener listener)
removeBlockedListener
in interface Connection
public void clearBlockedListeners()
clearBlockedListeners
in interface Connection
public ExceptionHandler getExceptionHandler()
getExceptionHandler
in interface Connection
public String getId()
getId
in interface Connection
public void setId(String id)
setId
in interface Connection
public void addShutdownListener(ShutdownListener listener)
addShutdownListener
in interface ShutdownNotifier
public void removeShutdownListener(ShutdownListener listener)
removeShutdownListener
in interface ShutdownNotifier
@Nullable public ShutdownSignalException getCloseReason()
getCloseReason
in interface ShutdownNotifier
public void notifyListeners()
notifyListeners
in interface ShutdownNotifier
public boolean isOpen()
isOpen
in interface ShutdownNotifier