public class ChannelManager extends Object
1.._channelMax).| Modifier and Type | Field and Description |
|---|---|
protected MetricsCollector |
metricsCollector |
| Constructor and Description |
|---|
ChannelManager(ConsumerWorkService workService,
int channelMax) |
ChannelManager(ConsumerWorkService workService,
int channelMax,
ThreadFactory threadFactory) |
ChannelManager(ConsumerWorkService workService,
int channelMax,
ThreadFactory threadFactory,
MetricsCollector metricsCollector) |
| Modifier and Type | Method and Description |
|---|---|
ChannelN |
createChannel(AMQConnection connection) |
ChannelN |
createChannel(AMQConnection connection,
int channelNumber) |
ChannelN |
getChannel(int channelNumber)
Looks up a channel on this connection.
|
int |
getChannelMax() |
ExecutorService |
getShutdownExecutor() |
void |
handleSignal(ShutdownSignalException signal)
Handle shutdown.
|
protected ChannelN |
instantiateChannel(AMQConnection connection,
int channelNumber,
ConsumerWorkService workService) |
void |
releaseChannelNumber(ChannelN channel)
Remove the channel from the channel map and free the number for re-use.
|
void |
setChannelShutdownTimeout(int channelShutdownTimeout)
Set the shutdown timeout for channels.
|
void |
setShutdownExecutor(ExecutorService shutdownExecutor) |
protected final MetricsCollector metricsCollector
public ChannelManager(ConsumerWorkService workService, int channelMax)
public ChannelManager(ConsumerWorkService workService, int channelMax, ThreadFactory threadFactory)
public ChannelManager(ConsumerWorkService workService, int channelMax, ThreadFactory threadFactory, MetricsCollector metricsCollector)
public int getChannelMax()
public ChannelN getChannel(int channelNumber)
channelNumber - the number of the required channelchannelNumberUnknownChannelException - if there is no channel with number channelNumber on this connectionpublic void handleSignal(ShutdownSignalException signal)
Channels are shutdown.signal - reason for shutdownpublic ChannelN createChannel(AMQConnection connection) throws IOException
IOExceptionpublic ChannelN createChannel(AMQConnection connection, int channelNumber) throws IOException
IOExceptionprotected ChannelN instantiateChannel(AMQConnection connection, int channelNumber, ConsumerWorkService workService)
public void releaseChannelNumber(ChannelN channel)
public ExecutorService getShutdownExecutor()
public void setShutdownExecutor(ExecutorService shutdownExecutor)
public void setChannelShutdownTimeout(int channelShutdownTimeout)
shutdownExecutor property is set.
Default to ConnectionFactory.DEFAULT_HEARTBEAT + 5 % secondschannelShutdownTimeout - shutdown timeout in millisecondsCopyright © 2021 VMware, Inc. or its affiliates.. All rights reserved.