Package org.apache.qpid.server.exchange
Class HeadersExchangeImpl
- java.lang.Object
-
- org.apache.qpid.server.model.AbstractConfiguredObject<T>
-
- org.apache.qpid.server.exchange.AbstractExchange<HeadersExchangeImpl>
-
- org.apache.qpid.server.exchange.HeadersExchangeImpl
-
- All Implemented Interfaces:
DestinationReferrer
,HeadersExchange<HeadersExchangeImpl>
,MessageDestination
,MessageNode
,MessageSender
,ConfiguredObject<HeadersExchangeImpl>
,ContextProvider
,Exchange<HeadersExchangeImpl>
,PermissionedObject
,TaskExecutorProvider
public class HeadersExchangeImpl extends AbstractExchange<HeadersExchangeImpl> implements HeadersExchange<HeadersExchangeImpl>
An exchange that binds queues based on a set of required headers and header values and routes messages to these queues by matching the headers of the message against those with which the queues were bound.The Headers Exchange Routes messages according to the value/presence of fields in the message header table. (Basic and JMS content has a content header field called "headers" that is a table of message header fields). class = "headers" routing key is not used Has the following binding arguments: the X-match field - if "all", does an AND match (used for GRM), if "any", does an OR match. other fields prefixed with "X-" are ignored (and generate a console warning message). a field with no value or empty value indicates a match on presence only. a field with a value indicates match on field presence and specific value. Standard instances: amq.match - pub/sub on field content/value
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.qpid.server.exchange.AbstractExchange
AbstractExchange.BindingIdentifier
-
Nested classes/interfaces inherited from class org.apache.qpid.server.model.AbstractConfiguredObject
AbstractConfiguredObject.CallableWithArgument<V,A>, AbstractConfiguredObject.ChainedListenableFuture<V>, AbstractConfiguredObject.ChainedSettableFuture<V>, AbstractConfiguredObject.DuplicateIdException, AbstractConfiguredObject.DuplicateNameException
-
Nested classes/interfaces inherited from interface org.apache.qpid.server.model.Exchange
Exchange.BehaviourOnUnknownDeclareArgument, Exchange.UnroutableMessageBehaviour
-
-
Field Summary
-
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.Exchange
ALTERNATE_BINDING, CLASS_DESCRIPTION, CREATING_LINK_INFO, DURABLE_BINDINGS, ON_UNKNOWN_EXCHANGE_DECLARE_OPTION, UNKNOWN_EXCHANGE_DECLARE_ARGUMENT_BEHAVIOUR_NAME, UNROUTABLE_MESSAGE_BEHAVIOUR
-
-
Constructor Summary
Constructors Constructor Description HeadersExchangeImpl(Map<String,Object> attributes, QueueManagingVirtualHost<?> vhost)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <M extends ServerMessage<? extends StorableMessageMetaData>>
voiddoRoute(M payload, String routingKey, InstanceProperties instanceProperties, RoutingResult<M> routingResult)
protected void
onBind(AbstractExchange.BindingIdentifier binding, Map<String,Object> arguments)
protected void
onBindingUpdated(AbstractExchange.BindingIdentifier binding, Map<String,Object> arguments)
protected void
onUnbind(AbstractExchange.BindingIdentifier binding)
-
Methods inherited from class org.apache.qpid.server.exchange.AbstractExchange
addBinding, addReference, authorisePublish, bind, close, deleteBinding, destinationRemoved, getAddressSpace, getAlternateBinding, getAlternateBindingDestination, getBindingCount, getBindings, getByteRoutes, getBytesDropped, getBytesIn, getCreatingLinkInfo, getDurableBindings, getEventLogger, getMessagesDropped, getMessagesIn, getMsgRoutes, getProducerCount, getPublishingLinks, getUnroutableMessageBehaviour, getVirtualHost, hasBinding, hasBindings, isAutoDelete, isBound, isBound, isBound, isBound, isBound, isBound, isBound, linkAdded, linkRemoved, logCreated, logDeleted, logOperation, logRecovered, logUpdated, onCreate, onDelete, onOpen, onValidate, removeReference, replaceBinding, resetStatistics, route, toString, unbind, validateChange, validateOnCreate
-
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, managesChildStorage, newToken, notifyStateChanged, onClose, onExceptionInOpen, onResolve, open, openAsync, postResolve, postResolveChildren, postSetAttributes, registerWithParents, removeChangeListener, removeContextVariable, rethrowRuntimeExceptionsOnOpen, runTask, setAttributes, setAttributesAsync, setContextVariable, setEncrypter, setState, setUserPreferences, start, startAsync, stop, updateModel, validateChildDelete
-
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, close, 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
-
Methods inherited from interface org.apache.qpid.server.model.Exchange
addBinding, bind, deleteBinding, getAlternateBinding, getBindingCount, getBindings, getBytesDropped, getBytesIn, getCreatingLinkInfo, getDurableBindings, getEventLogger, getMessagesDropped, getMessagesIn, getProducerCount, getPublishingLinks, getUnroutableMessageBehaviour, getVirtualHost, hasBinding, hasBindings, isAutoDelete, isBound, isBound, isBound, isBound, isBound, isBound, isBound, replaceBinding, resetStatistics, unbind
-
Methods inherited from interface org.apache.qpid.server.message.MessageDestination
addReference, authorisePublish, getAddressSpace, getAlternateBindingDestination, getName, isDurable, linkAdded, linkRemoved, removeReference, route
-
Methods inherited from interface org.apache.qpid.server.message.MessageSender
destinationRemoved
-
Methods inherited from interface org.apache.qpid.server.model.TaskExecutorProvider
getTaskExecutor
-
-
-
-
Constructor Detail
-
HeadersExchangeImpl
public HeadersExchangeImpl(Map<String,Object> attributes, QueueManagingVirtualHost<?> vhost)
-
-
Method Detail
-
doRoute
public <M extends ServerMessage<? extends StorableMessageMetaData>> void doRoute(M payload, String routingKey, InstanceProperties instanceProperties, RoutingResult<M> routingResult)
- Specified by:
doRoute
in classAbstractExchange<HeadersExchangeImpl>
-
onBind
protected void onBind(AbstractExchange.BindingIdentifier binding, Map<String,Object> arguments) throws AMQInvalidArgumentException
- Specified by:
onBind
in classAbstractExchange<HeadersExchangeImpl>
- Throws:
AMQInvalidArgumentException
-
onBindingUpdated
protected void onBindingUpdated(AbstractExchange.BindingIdentifier binding, Map<String,Object> arguments) throws AMQInvalidArgumentException
- Specified by:
onBindingUpdated
in classAbstractExchange<HeadersExchangeImpl>
- Throws:
AMQInvalidArgumentException
-
onUnbind
protected void onUnbind(AbstractExchange.BindingIdentifier binding)
- Specified by:
onUnbind
in classAbstractExchange<HeadersExchangeImpl>
-
-