Class ChannelManager

  • Direct Known Subclasses:

    public class ChannelManager
    extends Object
    Manages a set of channels, indexed by channel number (1.._channelMax).
    • Method Detail

      • getChannelMax

        public int getChannelMax()
      • getChannel

        public ChannelN getChannel​(int channelNumber)
        Looks up a channel on this connection.
        channelNumber - the number of the required channel
        the channel on this connection with number channelNumber
        com.rabbitmq.client.impl.UnknownChannelException - if there is no channel with number channelNumber on this connection
      • handleSignal

        public void handleSignal​(ShutdownSignalException signal)
        Handle shutdown. All the managed Channels are shutdown.
        signal - reason for shutdown
      • releaseChannelNumber

        public void releaseChannelNumber​(ChannelN channel)
        Remove the channel from the channel map and free the number for re-use. This method must be safe to call multiple times on the same channel. If it is not then things go badly wrong.
      • setShutdownExecutor

        public void setShutdownExecutor​(ExecutorService shutdownExecutor)
      • setChannelShutdownTimeout

        public void setChannelShutdownTimeout​(int channelShutdownTimeout)
        Set the shutdown timeout for channels. This is the amount of time the manager waits for a channel to shutdown before giving up. Works only when the shutdownExecutor property is set. Default to ConnectionFactory.DEFAULT_HEARTBEAT + 5 % seconds
        channelShutdownTimeout - shutdown timeout in milliseconds