public class AMQChannel extends Object implements AMQSessionModel<AMQChannel>, AsyncAutoCommitTransaction.FutureRecorder, org.apache.qpid.framing.ServerChannelMethodProcessor
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PREFETCH |
| Constructor and Description |
|---|
AMQChannel(AMQPConnection_0_8 connection,
int channelId,
MessageStore messageStore) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConsumerListener(ConsumerListener listener) |
void |
addDeleteTask(Action<? super AMQChannel> task) |
void |
addTicker(org.apache.qpid.transport.network.Ticker ticker) |
void |
addUnacknowledgedMessage(MessageInstance entry,
long deliveryTag,
ConsumerImpl consumer)
Add a message to the channel-based list of unacknowledged messages
|
void |
block() |
void |
block(AMQQueue queue) |
void |
checkTransactionStatus(long openWarn,
long openClose,
long idleWarn,
long idleClose) |
void |
close() |
void |
close(org.apache.qpid.protocol.AMQConstant cause,
String message) |
void |
commit(Runnable immediateAction,
boolean async) |
int |
compareTo(AMQSessionModel o) |
org.apache.qpid.framing.AMQShortString |
consumeFromSource(org.apache.qpid.framing.AMQShortString tag,
Collection<MessageSource> sources,
boolean acks,
org.apache.qpid.framing.FieldTable arguments,
boolean exclusive,
boolean noLocal)
Subscribe to a queue.
|
String |
debugIdentity() |
void |
ensureConsumersNoticedStateChange() |
AccessControlContext |
getAccessControllerContext() |
AMQPConnection<?> |
getAMQPConnection() |
boolean |
getBlocking() |
int |
getChannelId() |
ClientDeliveryMethod |
getClientDeliveryMethod() |
String |
getClientID() |
AMQPConnection_0_8 |
getConnection() |
Object |
getConnectionReference() |
int |
getConsumerCount() |
Collection<Consumer<?>> |
getConsumers() |
UUID |
getId() |
LogSubject |
getLogSubject() |
long |
getMaxUncommittedInMemorySize() |
MessageStore |
getMessageStore() |
Session<?> |
getModelObject() |
int |
getNextConsumerTag() |
long |
getNextDeliveryTag() |
RecordDeliveryMethod |
getRecordDeliveryMethod() |
Subject |
getSubject() |
ConsumerTarget |
getSubscription(org.apache.qpid.framing.AMQShortString tag) |
long |
getTransactionStartTime() |
long |
getTransactionUpdateTime() |
Long |
getTxnCommits() |
Long |
getTxnCount() |
Long |
getTxnRejects() |
Long |
getTxnStart() |
int |
getUnacknowledgedMessageCount() |
UnacknowledgedMessageMap |
getUnacknowledgedMessageMap()
Used only for testing purposes.
|
VirtualHostImpl |
getVirtualHost() |
boolean |
hasCurrentMessage() |
boolean |
ignoreAllButCloseOk() |
boolean |
isClosing() |
boolean |
isDeliveredTooManyTimes(long deliveryTag) |
boolean |
isMaxDeliveryCountEnabled(long deliveryTag) |
boolean |
isSuspended() |
boolean |
isTransactional() |
void |
notifyConsumerTargetCurrentStates() |
boolean |
processPending() |
void |
publishContentBody(org.apache.qpid.framing.ContentBody contentBody) |
void |
publishContentHeader(org.apache.qpid.framing.ContentHeaderBody contentHeaderBody) |
void |
receiveAccessRequest(org.apache.qpid.framing.AMQShortString realm,
boolean exclusive,
boolean passive,
boolean active,
boolean write,
boolean read) |
void |
receiveBasicAck(long deliveryTag,
boolean multiple) |
void |
receiveBasicCancel(org.apache.qpid.framing.AMQShortString consumerTag,
boolean nowait) |
void |
receiveBasicConsume(org.apache.qpid.framing.AMQShortString queue,
org.apache.qpid.framing.AMQShortString consumerTag,
boolean noLocal,
boolean noAck,
boolean exclusive,
boolean nowait,
org.apache.qpid.framing.FieldTable arguments) |
void |
receiveBasicGet(org.apache.qpid.framing.AMQShortString queueName,
boolean noAck) |
void |
receiveBasicNack(long deliveryTag,
boolean multiple,
boolean requeue) |
void |
receiveBasicPublish(org.apache.qpid.framing.AMQShortString exchangeName,
org.apache.qpid.framing.AMQShortString routingKey,
boolean mandatory,
boolean immediate) |
void |
receiveBasicQos(long prefetchSize,
int prefetchCount,
boolean global) |
void |
receiveBasicRecover(boolean requeue,
boolean sync) |
void |
receiveBasicReject(long deliveryTag,
boolean requeue) |
void |
receiveChannelClose(int replyCode,
org.apache.qpid.framing.AMQShortString replyText,
int classId,
int methodId) |
void |
receiveChannelCloseOk() |
void |
receiveChannelFlow(boolean active) |
void |
receiveChannelFlowOk(boolean active) |
void |
receiveConfirmSelect(boolean nowait) |
void |
receivedComplete() |
void |
receiveExchangeBound(org.apache.qpid.framing.AMQShortString exchangeName,
org.apache.qpid.framing.AMQShortString routingKey,
org.apache.qpid.framing.AMQShortString queueName) |
void |
receiveExchangeDeclare(org.apache.qpid.framing.AMQShortString exchangeName,
org.apache.qpid.framing.AMQShortString type,
boolean passive,
boolean durable,
boolean autoDelete,
boolean internal,
boolean nowait,
org.apache.qpid.framing.FieldTable arguments) |
void |
receiveExchangeDelete(org.apache.qpid.framing.AMQShortString exchangeStr,
boolean ifUnused,
boolean nowait) |
void |
receiveMessageContent(org.apache.qpid.bytebuffer.QpidByteBuffer data) |
void |
receiveMessageHeader(org.apache.qpid.framing.BasicContentHeaderProperties properties,
long bodySize) |
void |
receiveQueueBind(org.apache.qpid.framing.AMQShortString queueName,
org.apache.qpid.framing.AMQShortString exchange,
org.apache.qpid.framing.AMQShortString routingKey,
boolean nowait,
org.apache.qpid.framing.FieldTable argumentsTable) |
void |
receiveQueueDeclare(org.apache.qpid.framing.AMQShortString queueStr,
boolean passive,
boolean durable,
boolean exclusive,
boolean autoDelete,
boolean nowait,
org.apache.qpid.framing.FieldTable arguments) |
void |
receiveQueueDelete(org.apache.qpid.framing.AMQShortString queueName,
boolean ifUnused,
boolean ifEmpty,
boolean nowait) |
void |
receiveQueuePurge(org.apache.qpid.framing.AMQShortString queueName,
boolean nowait) |
void |
receiveQueueUnbind(org.apache.qpid.framing.AMQShortString queueName,
org.apache.qpid.framing.AMQShortString exchange,
org.apache.qpid.framing.AMQShortString bindingKey,
org.apache.qpid.framing.FieldTable arguments) |
void |
receiveTxCommit() |
void |
receiveTxRollback() |
void |
receiveTxSelect() |
void |
recordFuture(com.google.common.util.concurrent.ListenableFuture<Void> future,
ServerTransaction.Action action) |
void |
removeConsumerListener(ConsumerListener listener) |
void |
removeDeleteTask(Action<? super AMQChannel> task) |
void |
removeTicker(org.apache.qpid.transport.network.Ticker ticker) |
void |
requeue(long deliveryTag)
Requeue a single message
|
void |
setCredit(long prefetchSize,
int prefetchCount) |
void |
setLocalTransactional()
Sets this channel to be part of a local transaction
|
void |
setModelObject(Session<?> session) |
void |
setPublishFrame(org.apache.qpid.framing.MessagePublishInfo info,
MessageDestination e) |
void |
setSuspended(boolean suspended)
Called from the ChannelFlowHandler to suspend this Channel
|
void |
sync() |
String |
toString() |
void |
transportStateChanged() |
void |
unblock() |
void |
unblock(AMQQueue queue) |
boolean |
unsubscribeConsumer(org.apache.qpid.framing.AMQShortString consumerTag)
Unsubscribe a consumer from a queue.
|
public static final int DEFAULT_PREFETCH
public AMQChannel(AMQPConnection_0_8 connection, int channelId, MessageStore messageStore)
public AccessControlContext getAccessControllerContext()
public void setLocalTransactional()
public boolean isTransactional()
public void receivedComplete()
public Long getTxnCommits()
getTxnCommits in interface AMQSessionModel<AMQChannel>public Long getTxnRejects()
getTxnRejects in interface AMQSessionModel<AMQChannel>public Long getTxnCount()
getTxnCount in interface AMQSessionModel<AMQChannel>public Long getTxnStart()
getTxnStart in interface AMQSessionModel<AMQChannel>public int getChannelId()
getChannelId in interface AMQSessionModel<AMQChannel>public void setPublishFrame(org.apache.qpid.framing.MessagePublishInfo info,
MessageDestination e)
public void publishContentHeader(org.apache.qpid.framing.ContentHeaderBody contentHeaderBody)
public void publishContentBody(org.apache.qpid.framing.ContentBody contentBody)
public long getNextDeliveryTag()
public int getNextConsumerTag()
public ConsumerTarget getSubscription(org.apache.qpid.framing.AMQShortString tag)
public org.apache.qpid.framing.AMQShortString consumeFromSource(org.apache.qpid.framing.AMQShortString tag,
Collection<MessageSource> sources,
boolean acks,
org.apache.qpid.framing.FieldTable arguments,
boolean exclusive,
boolean noLocal)
throws MessageSource.ExistingConsumerPreventsExclusive,
MessageSource.ExistingExclusiveConsumer,
AMQInvalidArgumentException,
MessageSource.ConsumerAccessRefused,
ConsumerTagInUseException
tag - the tag chosen by the client (if null, server will generate one)sources - the queues to subscribe toacks - Are acks enabled for this subscriberarguments - Filters to apply to this subscriberexclusive - Flag requesting exclusive access to the queueMessageSource.ExistingConsumerPreventsExclusiveMessageSource.ExistingExclusiveConsumerAMQInvalidArgumentExceptionMessageSource.ConsumerAccessRefusedConsumerTagInUseExceptionpublic boolean unsubscribeConsumer(org.apache.qpid.framing.AMQShortString consumerTag)
consumerTag - public void close()
close in interface AMQSessionModel<AMQChannel>public void close(org.apache.qpid.protocol.AMQConstant cause,
String message)
close in interface AMQSessionModel<AMQChannel>public void addUnacknowledgedMessage(MessageInstance entry, long deliveryTag, ConsumerImpl consumer)
entry - the record of the message on the queue that was delivereddeliveryTag - the delivery tag used when delivering the message (see protocol spec for description of the
delivery tag)consumer - The consumer that is to acknowledge this message.public String debugIdentity()
public void requeue(long deliveryTag)
deliveryTag - The message to requeuepublic boolean isMaxDeliveryCountEnabled(long deliveryTag)
public boolean isDeliveredTooManyTimes(long deliveryTag)
public UnacknowledgedMessageMap getUnacknowledgedMessageMap()
public void setSuspended(boolean suspended)
suspended - boolean, should this Channel be suspendedpublic boolean isSuspended()
public void commit(Runnable immediateAction, boolean async)
public boolean isClosing()
public AMQPConnection_0_8 getConnection()
public void setCredit(long prefetchSize,
int prefetchCount)
public MessageStore getMessageStore()
public ClientDeliveryMethod getClientDeliveryMethod()
public RecordDeliveryMethod getRecordDeliveryMethod()
public UUID getId()
getId in interface AMQSessionModel<AMQChannel>public AMQPConnection<?> getAMQPConnection()
getAMQPConnection in interface AMQSessionModel<AMQChannel>public String getClientID()
getClientID in interface AMQSessionModel<AMQChannel>public LogSubject getLogSubject()
getLogSubject in interface AMQSessionModel<AMQChannel>public int compareTo(AMQSessionModel o)
compareTo in interface Comparable<AMQSessionModel>public void addDeleteTask(Action<? super AMQChannel> task)
addDeleteTask in interface Deletable<AMQChannel>public void removeDeleteTask(Action<? super AMQChannel> task)
removeDeleteTask in interface Deletable<AMQChannel>public Subject getSubject()
public boolean hasCurrentMessage()
public long getMaxUncommittedInMemorySize()
public void block()
block in interface AMQSessionModel<AMQChannel>public void unblock()
unblock in interface AMQSessionModel<AMQChannel>public void block(AMQQueue queue)
block in interface AMQSessionModel<AMQChannel>public void unblock(AMQQueue queue)
unblock in interface AMQSessionModel<AMQChannel>public void transportStateChanged()
transportStateChanged in interface AMQSessionModel<AMQChannel>public Object getConnectionReference()
getConnectionReference in interface AMQSessionModel<AMQChannel>public int getUnacknowledgedMessageCount()
getUnacknowledgedMessageCount in interface AMQSessionModel<AMQChannel>public boolean getBlocking()
getBlocking in interface AMQSessionModel<AMQChannel>public VirtualHostImpl getVirtualHost()
public void checkTransactionStatus(long openWarn,
long openClose,
long idleWarn,
long idleClose)
checkTransactionStatus in interface AMQSessionModel<AMQChannel>public void recordFuture(com.google.common.util.concurrent.ListenableFuture<Void> future, ServerTransaction.Action action)
recordFuture in interface AsyncAutoCommitTransaction.FutureRecorderpublic void sync()
public int getConsumerCount()
getConsumerCount in interface AMQSessionModel<AMQChannel>public Collection<Consumer<?>> getConsumers()
getConsumers in interface AMQSessionModel<AMQChannel>public void addConsumerListener(ConsumerListener listener)
addConsumerListener in interface AMQSessionModel<AMQChannel>public void removeConsumerListener(ConsumerListener listener)
removeConsumerListener in interface AMQSessionModel<AMQChannel>public void setModelObject(Session<?> session)
setModelObject in interface AMQSessionModel<AMQChannel>public Session<?> getModelObject()
getModelObject in interface AMQSessionModel<AMQChannel>public long getTransactionStartTime()
getTransactionStartTime in interface AMQSessionModel<AMQChannel>public long getTransactionUpdateTime()
getTransactionUpdateTime in interface AMQSessionModel<AMQChannel>public void receiveAccessRequest(org.apache.qpid.framing.AMQShortString realm,
boolean exclusive,
boolean passive,
boolean active,
boolean write,
boolean read)
receiveAccessRequest in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic void receiveBasicAck(long deliveryTag,
boolean multiple)
receiveBasicAck in interface org.apache.qpid.framing.ChannelMethodProcessorreceiveBasicAck in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic void receiveBasicCancel(org.apache.qpid.framing.AMQShortString consumerTag,
boolean nowait)
receiveBasicCancel in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic void receiveBasicConsume(org.apache.qpid.framing.AMQShortString queue,
org.apache.qpid.framing.AMQShortString consumerTag,
boolean noLocal,
boolean noAck,
boolean exclusive,
boolean nowait,
org.apache.qpid.framing.FieldTable arguments)
receiveBasicConsume in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic void receiveBasicGet(org.apache.qpid.framing.AMQShortString queueName,
boolean noAck)
receiveBasicGet in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic void receiveBasicPublish(org.apache.qpid.framing.AMQShortString exchangeName,
org.apache.qpid.framing.AMQShortString routingKey,
boolean mandatory,
boolean immediate)
receiveBasicPublish in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic void receiveBasicQos(long prefetchSize,
int prefetchCount,
boolean global)
receiveBasicQos in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic void receiveBasicRecover(boolean requeue,
boolean sync)
receiveBasicRecover in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic void receiveBasicReject(long deliveryTag,
boolean requeue)
receiveBasicReject in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic void receiveChannelClose(int replyCode,
org.apache.qpid.framing.AMQShortString replyText,
int classId,
int methodId)
receiveChannelClose in interface org.apache.qpid.framing.ChannelMethodProcessorpublic void receiveChannelCloseOk()
receiveChannelCloseOk in interface org.apache.qpid.framing.ChannelMethodProcessorpublic void receiveMessageContent(org.apache.qpid.bytebuffer.QpidByteBuffer data)
receiveMessageContent in interface org.apache.qpid.framing.ChannelMethodProcessorpublic void receiveMessageHeader(org.apache.qpid.framing.BasicContentHeaderProperties properties,
long bodySize)
receiveMessageHeader in interface org.apache.qpid.framing.ChannelMethodProcessorpublic boolean ignoreAllButCloseOk()
ignoreAllButCloseOk in interface org.apache.qpid.framing.ChannelMethodProcessorpublic void receiveBasicNack(long deliveryTag,
boolean multiple,
boolean requeue)
receiveBasicNack in interface org.apache.qpid.framing.ChannelMethodProcessorpublic void receiveChannelFlow(boolean active)
receiveChannelFlow in interface org.apache.qpid.framing.ChannelMethodProcessorpublic void receiveChannelFlowOk(boolean active)
receiveChannelFlowOk in interface org.apache.qpid.framing.ChannelMethodProcessorpublic void receiveExchangeBound(org.apache.qpid.framing.AMQShortString exchangeName,
org.apache.qpid.framing.AMQShortString routingKey,
org.apache.qpid.framing.AMQShortString queueName)
receiveExchangeBound in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic void receiveExchangeDeclare(org.apache.qpid.framing.AMQShortString exchangeName,
org.apache.qpid.framing.AMQShortString type,
boolean passive,
boolean durable,
boolean autoDelete,
boolean internal,
boolean nowait,
org.apache.qpid.framing.FieldTable arguments)
receiveExchangeDeclare in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic void receiveExchangeDelete(org.apache.qpid.framing.AMQShortString exchangeStr,
boolean ifUnused,
boolean nowait)
receiveExchangeDelete in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic void receiveQueueBind(org.apache.qpid.framing.AMQShortString queueName,
org.apache.qpid.framing.AMQShortString exchange,
org.apache.qpid.framing.AMQShortString routingKey,
boolean nowait,
org.apache.qpid.framing.FieldTable argumentsTable)
receiveQueueBind in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic void receiveQueueDeclare(org.apache.qpid.framing.AMQShortString queueStr,
boolean passive,
boolean durable,
boolean exclusive,
boolean autoDelete,
boolean nowait,
org.apache.qpid.framing.FieldTable arguments)
receiveQueueDeclare in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic void receiveQueueDelete(org.apache.qpid.framing.AMQShortString queueName,
boolean ifUnused,
boolean ifEmpty,
boolean nowait)
receiveQueueDelete in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic void receiveQueuePurge(org.apache.qpid.framing.AMQShortString queueName,
boolean nowait)
receiveQueuePurge in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic void receiveQueueUnbind(org.apache.qpid.framing.AMQShortString queueName,
org.apache.qpid.framing.AMQShortString exchange,
org.apache.qpid.framing.AMQShortString bindingKey,
org.apache.qpid.framing.FieldTable arguments)
receiveQueueUnbind in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic void receiveTxSelect()
receiveTxSelect in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic void receiveTxCommit()
receiveTxCommit in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic void receiveTxRollback()
receiveTxRollback in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic void receiveConfirmSelect(boolean nowait)
receiveConfirmSelect in interface org.apache.qpid.framing.ServerChannelMethodProcessorpublic boolean processPending()
processPending in interface AMQSessionModel<AMQChannel>public void addTicker(org.apache.qpid.transport.network.Ticker ticker)
addTicker in interface AMQSessionModel<AMQChannel>public void removeTicker(org.apache.qpid.transport.network.Ticker ticker)
removeTicker in interface AMQSessionModel<AMQChannel>public void notifyConsumerTargetCurrentStates()
notifyConsumerTargetCurrentStates in interface AMQSessionModel<AMQChannel>public void ensureConsumersNoticedStateChange()
ensureConsumersNoticedStateChange in interface AMQSessionModel<AMQChannel>Copyright © 2006–2017 The Apache Software Foundation. All rights reserved.