Class AMQChannel
- java.lang.Object
-
- org.apache.qpid.server.model.AbstractConfiguredObject<S>
-
- org.apache.qpid.server.session.AbstractAMQPSession<AMQChannel,ConsumerTarget_0_8>
-
- org.apache.qpid.server.protocol.v0_8.AMQChannel
-
- All Implemented Interfaces:
org.apache.qpid.server.logging.EventLoggerProvider,org.apache.qpid.server.model.ConfiguredObject<AMQChannel>,org.apache.qpid.server.model.ContextProvider,org.apache.qpid.server.model.PermissionedObject,org.apache.qpid.server.model.Session<AMQChannel>,org.apache.qpid.server.model.TaskExecutorProvider,CreditRestorer,ChannelMethodProcessor,ServerChannelMethodProcessor,org.apache.qpid.server.session.AMQPSession<AMQChannel,ConsumerTarget_0_8>,org.apache.qpid.server.txn.AsyncAutoCommitTransaction.FutureRecorder,org.apache.qpid.server.util.Deletable<AMQChannel>
public class AMQChannel extends org.apache.qpid.server.session.AbstractAMQPSession<AMQChannel,ConsumerTarget_0_8> implements org.apache.qpid.server.txn.AsyncAutoCommitTransaction.FutureRecorder, ServerChannelMethodProcessor, org.apache.qpid.server.logging.EventLoggerProvider, CreditRestorer, org.apache.qpid.server.util.Deletable<AMQChannel>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.qpid.server.model.AbstractConfiguredObject
org.apache.qpid.server.model.AbstractConfiguredObject.CallableWithArgument<V extends java.lang.Object,A extends java.lang.Object>, org.apache.qpid.server.model.AbstractConfiguredObject.ChainedListenableFuture<V extends java.lang.Object>, org.apache.qpid.server.model.AbstractConfiguredObject.ChainedSettableFuture<V extends java.lang.Object>, org.apache.qpid.server.model.AbstractConfiguredObject.DuplicateIdException, org.apache.qpid.server.model.AbstractConfiguredObject.DuplicateNameException
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_PREFETCH-
Fields inherited from class org.apache.qpid.server.session.AbstractAMQPSession
_accessControllerContext, _consumersWithPendingWork, _publishAuthCache, _subject, _taskList, _token
-
Fields inherited from class org.apache.qpid.server.model.AbstractConfiguredObject
SECURED_STRING_VALUE
-
Fields inherited from interface org.apache.qpid.server.model.ConfiguredObject
AWAIT_ATTAINMENT_TIMEOUT, CONTEXT, CREATED_BY, CREATED_TIME, DEFAULT_AWAIT_ATTAINMENT_TIMEOUT, DESCRIPTION, DESIRED_STATE, DURABLE, ID, LAST_UPDATED_BY, LAST_UPDATED_TIME, LIFETIME_POLICY, NAME, OVER_SIZED_ATTRIBUTE_ALTERNATIVE_TEXT, STATE, TYPE
-
Fields inherited from interface org.apache.qpid.server.model.Session
CHANNEL_ID, PRODUCER_AUTH_CACHE_SIZE, PRODUCER_AUTH_CACHE_SIZE_DEFAULT, PRODUCER_AUTH_CACHE_TIMEOUT, PRODUCER_AUTH_CACHE_TIMEOUT_DEFAULT, PRODUCER_FLOW_BLOCKED, TRANSACTION_TIMEOUT_NOTIFICATION_REPEAT_PERIOD, TRANSACTION_TIMEOUT_NOTIFICATION_REPEAT_PERIOD_DEFAULT
-
-
Constructor Summary
Constructors Constructor Description AMQChannel(AMQPConnection_0_8 connection, int channelId, org.apache.qpid.server.store.MessageStore messageStore)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddUnacknowledgedMessage(org.apache.qpid.server.message.MessageInstance entry, long deliveryTag, org.apache.qpid.server.message.MessageInstanceConsumer consumer, boolean usesCredit)Add a message to the channel-based list of unacknowledged messagesvoidblock()voidblock(org.apache.qpid.server.model.Queue<?> queue)voidclose()voidclose(int cause, java.lang.String message)voiddispose()java.security.AccessControlContextgetAccessControllerContext()org.apache.qpid.server.model.NamedAddressSpacegetAddressSpace()booleangetBlocking()ClientDeliveryMethodgetClientDeliveryMethod()AMQPConnection_0_8<?>getConnection()java.lang.ObjectgetConnectionReference()longgetNextDeliveryTag()javax.security.auth.SubjectgetSubject()longgetTransactionStartTimeLong()longgetTransactionUpdateTimeLong()intgetUnacknowledgedMessageCount()booleanignoreAllButCloseOk()booleanisChannelFlow()booleanisClosing()voidreceiveAccessRequest(AMQShortString realm, boolean exclusive, boolean passive, boolean active, boolean write, boolean read)voidreceiveBasicAck(long deliveryTag, boolean multiple)voidreceiveBasicCancel(AMQShortString consumerTag, boolean nowait)voidreceiveBasicConsume(AMQShortString queue, AMQShortString consumerTag, boolean noLocal, boolean noAck, boolean exclusive, boolean nowait, FieldTable arguments)voidreceiveBasicGet(AMQShortString queueName, boolean noAck)voidreceiveBasicNack(long deliveryTag, boolean multiple, boolean requeue)voidreceiveBasicPublish(AMQShortString exchangeName, AMQShortString routingKey, boolean mandatory, boolean immediate)voidreceiveBasicQos(long prefetchSize, int prefetchCount, boolean global)voidreceiveBasicRecover(boolean requeue, boolean sync)voidreceiveBasicReject(long deliveryTag, boolean requeue)voidreceiveChannelClose(int replyCode, AMQShortString replyText, int classId, int methodId)voidreceiveChannelCloseOk()voidreceiveChannelFlow(boolean active)voidreceiveChannelFlowOk(boolean active)voidreceiveConfirmSelect(boolean nowait)voidreceivedComplete()voidreceiveExchangeBound(AMQShortString exchangeName, AMQShortString routingKey, AMQShortString queueName)voidreceiveExchangeDeclare(AMQShortString exchangeName, AMQShortString type, boolean passive, boolean durable, boolean autoDelete, boolean internal, boolean nowait, FieldTable arguments)voidreceiveExchangeDelete(AMQShortString exchangeStr, boolean ifUnused, boolean nowait)voidreceiveMessageContent(org.apache.qpid.server.bytebuffer.QpidByteBuffer data)voidreceiveMessageHeader(BasicContentHeaderProperties properties, long bodySize)voidreceiveQueueBind(AMQShortString queueName, AMQShortString exchange, AMQShortString bindingKey, boolean nowait, FieldTable argumentsTable)voidreceiveQueueDeclare(AMQShortString queueStr, boolean passive, boolean durable, boolean exclusive, boolean autoDelete, boolean nowait, FieldTable arguments)voidreceiveQueueDelete(AMQShortString queueName, boolean ifUnused, boolean ifEmpty, boolean nowait)voidreceiveQueuePurge(AMQShortString queueName, boolean nowait)voidreceiveQueueUnbind(AMQShortString queueName, AMQShortString exchange, AMQShortString bindingKey, FieldTable arguments)voidreceiveTxCommit()voidreceiveTxRollback()voidreceiveTxSelect()voidrecordFuture(com.google.common.util.concurrent.ListenableFuture<java.lang.Void> future, org.apache.qpid.server.txn.ServerTransaction.Action action)voidrestoreCredit(org.apache.qpid.server.consumer.ConsumerTarget target, int count, long size)java.lang.StringtoString()voidtransportStateChanged()voidunblock()voidunblock(org.apache.qpid.server.model.Queue<?> queue)protected voidupdateBlockedStateIfNecessary()-
Methods inherited from class org.apache.qpid.server.session.AbstractAMQPSession
addDeleteTask, addProducer, addTicker, consumerAdded, consumerRemoved, doOnIOThreadAsync, getAMQPConnection, getBytesIn, getBytesOut, getChannelId, getConsumerCount, getConsumers, getEventLogger, getLogSubject, getMessagesIn, getMessagesOut, getProducerCount, getTransactedMessagesIn, getTransactedMessagesOut, getUnacknowledgedMessages, isProducerFlowBlocked, logCreated, logDeleted, logOperation, notifyWork, onCreate, onDelete, processPending, registerMessageDelivered, registerMessageReceived, registerTransactedMessageDelivered, registerTransactedMessageReceived, removeDeleteTask, removeProducer, removeTicker, resetStatistics
-
Methods inherited from class org.apache.qpid.server.model.AbstractConfiguredObject
addChangeListener, addChildAsync, addFutureCallback, applyToChildren, asObjectRecord, attainState, attributesAsString, attributeSet, authorise, authorise, authorise, authoriseCreateChild, awaitChildClassToAttainState, awaitChildClassToAttainState, beforeClose, beforeDelete, changeAttributes, childAdded, childRemoved, closeAsync, closeChildren, create, createAsync, createChild, createChildAsync, decryptSecrets, delete, deleteAsync, deleteChildren, deleteNoChecks, doAfter, doAfter, doAfter, doAfter, doAfter, doAfter, doAfterAlways, doAfterAlways, doCreation, doOnConfigThread, doOpening, doResolution, doSync, doSync, doValidation, findConfiguredObject, forceUpdateAllSecureAttributes, getAccessControl, getActualAttributes, getAncestor, getAttainedChildById, getAttainedChildByName, getAttribute, getAttributeNames, getCategoryClass, getChildById, getChildByName, getChildExecutor, getChildren, getContext, getContextKeys, getContextValue, getContextValue, getCreatedBy, getCreatedTime, getDescription, getDesiredState, getId, getLastOpenedTime, getLastUpdatedBy, getLastUpdatedTime, getLifetimePolicy, getModel, getName, getObjectFactory, getParent, getState, getStatistics, getStatistics, getSubjectWithAddedSystemRights, getSystemPrincipal, getSystemTaskControllerContext, getSystemTaskSubject, getSystemTaskSubject, getTaskExecutor, getType, getTypeClass, getUserPreferences, handleExceptionOnOpen, hasEncrypter, isDurable, isSystemProcess, isSystemSubject, logRecovered, logUpdated, managesChildStorage, newToken, notifyStateChanged, onClose, onExceptionInOpen, onOpen, onResolve, onValidate, open, openAsync, postResolve, postResolveChildren, postSetAttributes, registerWithParents, removeChangeListener, removeContextVariable, rethrowRuntimeExceptionsOnOpen, runTask, setAttributes, setAttributesAsync, setContextVariable, setEncrypter, setState, setUserPreferences, start, startAsync, stop, updateModel, validateChange, validateChildDelete, validateOnCreate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.qpid.server.model.ConfiguredObject
addChangeListener, asObjectRecord, authorise, authorise, authorise, closeAsync, createChild, createChildAsync, decryptSecrets, delete, deleteAsync, findConfiguredObject, getActualAttributes, getAttainedChildById, getAttainedChildByName, getAttribute, getAttributeNames, getCategoryClass, getChildById, getChildByName, getChildExecutor, getChildren, getContext, getCreatedBy, getCreatedTime, getDescription, getDesiredState, getId, getLastOpenedTime, getLastUpdatedBy, getLastUpdatedTime, getLifetimePolicy, getModel, getName, getObjectFactory, getParent, getState, getStatistics, getStatistics, getType, getTypeClass, getUserPreferences, hasEncrypter, isDurable, managesChildStorage, newToken, open, openAsync, removeChangeListener, removeContextVariable, setAttributes, setAttributesAsync, setContextVariable, setUserPreferences
-
Methods inherited from interface org.apache.qpid.server.model.ContextProvider
getContextKeys, getContextValue, getContextValue
-
-
-
-
Field Detail
-
DEFAULT_PREFETCH
public static final int DEFAULT_PREFETCH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AMQChannel
public AMQChannel(AMQPConnection_0_8 connection, int channelId, org.apache.qpid.server.store.MessageStore messageStore)
-
-
Method Detail
-
getAccessControllerContext
public java.security.AccessControlContext getAccessControllerContext()
-
receivedComplete
public final void receivedComplete()
-
getNextDeliveryTag
public long getNextDeliveryTag()
-
close
public void close()
- Specified by:
closein interfaceorg.apache.qpid.server.session.AMQPSession<AMQChannel,ConsumerTarget_0_8>- Specified by:
closein interfaceorg.apache.qpid.server.model.ConfiguredObject<AMQChannel>- Overrides:
closein classorg.apache.qpid.server.model.AbstractConfiguredObject<AMQChannel>
-
close
public void close(int cause, java.lang.String message)
-
addUnacknowledgedMessage
public void addUnacknowledgedMessage(org.apache.qpid.server.message.MessageInstance entry, long deliveryTag, org.apache.qpid.server.message.MessageInstanceConsumer consumer, boolean usesCredit)Add a message to the channel-based list of unacknowledged messages- Parameters:
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.usesCredit-
-
toString
public java.lang.String toString()
- Overrides:
toStringin classorg.apache.qpid.server.model.AbstractConfiguredObject<AMQChannel>
-
isClosing
public boolean isClosing()
- Specified by:
isClosingin classorg.apache.qpid.server.session.AbstractAMQPSession<AMQChannel,ConsumerTarget_0_8>
-
getConnection
public AMQPConnection_0_8<?> getConnection()
-
getClientDeliveryMethod
public ClientDeliveryMethod getClientDeliveryMethod()
-
getSubject
public javax.security.auth.Subject getSubject()
-
isChannelFlow
public boolean isChannelFlow()
-
block
public void block()
- Specified by:
blockin interfaceorg.apache.qpid.server.session.AMQPSession<AMQChannel,ConsumerTarget_0_8>
-
unblock
public void unblock()
- Specified by:
unblockin interfaceorg.apache.qpid.server.session.AMQPSession<AMQChannel,ConsumerTarget_0_8>
-
block
public void block(org.apache.qpid.server.model.Queue<?> queue)
- Specified by:
blockin interfaceorg.apache.qpid.server.session.AMQPSession<AMQChannel,ConsumerTarget_0_8>
-
unblock
public void unblock(org.apache.qpid.server.model.Queue<?> queue)
- Specified by:
unblockin interfaceorg.apache.qpid.server.session.AMQPSession<AMQChannel,ConsumerTarget_0_8>
-
transportStateChanged
public void transportStateChanged()
- Specified by:
transportStateChangedin interfaceorg.apache.qpid.server.session.AMQPSession<AMQChannel,ConsumerTarget_0_8>
-
getConnectionReference
public java.lang.Object getConnectionReference()
- Specified by:
getConnectionReferencein interfaceorg.apache.qpid.server.session.AMQPSession<AMQChannel,ConsumerTarget_0_8>
-
getUnacknowledgedMessageCount
public int getUnacknowledgedMessageCount()
- Specified by:
getUnacknowledgedMessageCountin interfaceorg.apache.qpid.server.session.AMQPSession<AMQChannel,ConsumerTarget_0_8>
-
getBlocking
public boolean getBlocking()
- Specified by:
getBlockingin interfaceorg.apache.qpid.server.session.AMQPSession<AMQChannel,ConsumerTarget_0_8>
-
getAddressSpace
public org.apache.qpid.server.model.NamedAddressSpace getAddressSpace()
-
recordFuture
public void recordFuture(com.google.common.util.concurrent.ListenableFuture<java.lang.Void> future, org.apache.qpid.server.txn.ServerTransaction.Action action)- Specified by:
recordFuturein interfaceorg.apache.qpid.server.txn.AsyncAutoCommitTransaction.FutureRecorder
-
getTransactionStartTimeLong
public long getTransactionStartTimeLong()
- Specified by:
getTransactionStartTimeLongin interfaceorg.apache.qpid.server.session.AMQPSession<AMQChannel,ConsumerTarget_0_8>
-
getTransactionUpdateTimeLong
public long getTransactionUpdateTimeLong()
- Specified by:
getTransactionUpdateTimeLongin interfaceorg.apache.qpid.server.session.AMQPSession<AMQChannel,ConsumerTarget_0_8>
-
receiveAccessRequest
public void receiveAccessRequest(AMQShortString realm, boolean exclusive, boolean passive, boolean active, boolean write, boolean read)
- Specified by:
receiveAccessRequestin interfaceServerChannelMethodProcessor
-
receiveBasicAck
public void receiveBasicAck(long deliveryTag, boolean multiple)- Specified by:
receiveBasicAckin interfaceChannelMethodProcessor- Specified by:
receiveBasicAckin interfaceServerChannelMethodProcessor
-
receiveBasicCancel
public void receiveBasicCancel(AMQShortString consumerTag, boolean nowait)
- Specified by:
receiveBasicCancelin interfaceServerChannelMethodProcessor
-
receiveBasicConsume
public void receiveBasicConsume(AMQShortString queue, AMQShortString consumerTag, boolean noLocal, boolean noAck, boolean exclusive, boolean nowait, FieldTable arguments)
- Specified by:
receiveBasicConsumein interfaceServerChannelMethodProcessor
-
receiveBasicGet
public void receiveBasicGet(AMQShortString queueName, boolean noAck)
- Specified by:
receiveBasicGetin interfaceServerChannelMethodProcessor
-
receiveBasicPublish
public void receiveBasicPublish(AMQShortString exchangeName, AMQShortString routingKey, boolean mandatory, boolean immediate)
- Specified by:
receiveBasicPublishin interfaceServerChannelMethodProcessor
-
receiveBasicQos
public void receiveBasicQos(long prefetchSize, int prefetchCount, boolean global)- Specified by:
receiveBasicQosin interfaceServerChannelMethodProcessor
-
receiveBasicRecover
public void receiveBasicRecover(boolean requeue, boolean sync)- Specified by:
receiveBasicRecoverin interfaceServerChannelMethodProcessor
-
receiveBasicReject
public void receiveBasicReject(long deliveryTag, boolean requeue)- Specified by:
receiveBasicRejectin interfaceServerChannelMethodProcessor
-
receiveChannelClose
public void receiveChannelClose(int replyCode, AMQShortString replyText, int classId, int methodId)- Specified by:
receiveChannelClosein interfaceChannelMethodProcessor
-
receiveChannelCloseOk
public void receiveChannelCloseOk()
- Specified by:
receiveChannelCloseOkin interfaceChannelMethodProcessor
-
receiveMessageContent
public void receiveMessageContent(org.apache.qpid.server.bytebuffer.QpidByteBuffer data)
- Specified by:
receiveMessageContentin interfaceChannelMethodProcessor
-
receiveMessageHeader
public void receiveMessageHeader(BasicContentHeaderProperties properties, long bodySize)
- Specified by:
receiveMessageHeaderin interfaceChannelMethodProcessor
-
ignoreAllButCloseOk
public boolean ignoreAllButCloseOk()
- Specified by:
ignoreAllButCloseOkin interfaceChannelMethodProcessor
-
receiveBasicNack
public void receiveBasicNack(long deliveryTag, boolean multiple, boolean requeue)- Specified by:
receiveBasicNackin interfaceChannelMethodProcessor
-
receiveChannelFlow
public void receiveChannelFlow(boolean active)
- Specified by:
receiveChannelFlowin interfaceChannelMethodProcessor
-
receiveChannelFlowOk
public void receiveChannelFlowOk(boolean active)
- Specified by:
receiveChannelFlowOkin interfaceChannelMethodProcessor
-
receiveExchangeBound
public void receiveExchangeBound(AMQShortString exchangeName, AMQShortString routingKey, AMQShortString queueName)
- Specified by:
receiveExchangeBoundin interfaceServerChannelMethodProcessor
-
receiveExchangeDeclare
public void receiveExchangeDeclare(AMQShortString exchangeName, AMQShortString type, boolean passive, boolean durable, boolean autoDelete, boolean internal, boolean nowait, FieldTable arguments)
- Specified by:
receiveExchangeDeclarein interfaceServerChannelMethodProcessor
-
receiveExchangeDelete
public void receiveExchangeDelete(AMQShortString exchangeStr, boolean ifUnused, boolean nowait)
- Specified by:
receiveExchangeDeletein interfaceServerChannelMethodProcessor
-
receiveQueueBind
public void receiveQueueBind(AMQShortString queueName, AMQShortString exchange, AMQShortString bindingKey, boolean nowait, FieldTable argumentsTable)
- Specified by:
receiveQueueBindin interfaceServerChannelMethodProcessor
-
receiveQueueDeclare
public void receiveQueueDeclare(AMQShortString queueStr, boolean passive, boolean durable, boolean exclusive, boolean autoDelete, boolean nowait, FieldTable arguments)
- Specified by:
receiveQueueDeclarein interfaceServerChannelMethodProcessor
-
receiveQueueDelete
public void receiveQueueDelete(AMQShortString queueName, boolean ifUnused, boolean ifEmpty, boolean nowait)
- Specified by:
receiveQueueDeletein interfaceServerChannelMethodProcessor
-
receiveQueuePurge
public void receiveQueuePurge(AMQShortString queueName, boolean nowait)
- Specified by:
receiveQueuePurgein interfaceServerChannelMethodProcessor
-
receiveQueueUnbind
public void receiveQueueUnbind(AMQShortString queueName, AMQShortString exchange, AMQShortString bindingKey, FieldTable arguments)
- Specified by:
receiveQueueUnbindin interfaceServerChannelMethodProcessor
-
receiveTxSelect
public void receiveTxSelect()
- Specified by:
receiveTxSelectin interfaceServerChannelMethodProcessor
-
receiveTxCommit
public void receiveTxCommit()
- Specified by:
receiveTxCommitin interfaceServerChannelMethodProcessor
-
receiveTxRollback
public void receiveTxRollback()
- Specified by:
receiveTxRollbackin interfaceServerChannelMethodProcessor
-
receiveConfirmSelect
public void receiveConfirmSelect(boolean nowait)
- Specified by:
receiveConfirmSelectin interfaceServerChannelMethodProcessor
-
updateBlockedStateIfNecessary
protected void updateBlockedStateIfNecessary()
- Specified by:
updateBlockedStateIfNecessaryin classorg.apache.qpid.server.session.AbstractAMQPSession<AMQChannel,ConsumerTarget_0_8>
-
restoreCredit
public void restoreCredit(org.apache.qpid.server.consumer.ConsumerTarget target, int count, long size)- Specified by:
restoreCreditin interfaceCreditRestorer
-
dispose
public void dispose()
-
-