public AMQChannel(AMQPConnection_0_8 connection, int channelId, final MessageStore messageStore)
{
super(connection, channelId);
_creditManager = new Pre0_10CreditManager(0L, 0L,
connection.getContextValue(Long.class, AMQPConnection_0_8.HIGH_PREFETCH_LIMIT),
connection.getContextValue(Long.class, AMQPConnection_0_8.BATCH_LIMIT));
_unacknowledgedMessageMap = new UnacknowledgedMessageMapImpl(DEFAULT_PREFETCH, this);
_connection = connection;
_channelId = channelId;
_messageStore = messageStore;
_blockingTimeout = connection.getBroker().getContextValue(Long.class,
Broker.CHANNEL_FLOW_CONTROL_ENFORCEMENT_TIMEOUT);
_transaction = new AsyncAutoCommitTransaction(_messageStore, this);
MethodRegistry methodRegistry = _connection.getMethodRegistry();
AMQMethodBody responseBody = methodRegistry.createTxCommitOkBody();
_txCommitOkFrame = new CachedFrame(responseBody.generateFrame(_channelId));
_clientDeliveryMethod = connection.createDeliveryMethod(_channelId);
AccessController.doPrivileged((new PrivilegedAction<Object>()
{
@Override
public Object run()
{
message(ChannelMessages.CREATE());
return null;
}
}),_accessControllerContext);
}