public abstract class AbstractExchange<T extends AbstractExchange<T>> extends AbstractConfiguredObject<T> implements ExchangeImpl<T>
AbstractConfiguredObject.CallableWithArgument<V,A>, AbstractConfiguredObject.ChainedListenableFuture<V>, AbstractConfiguredObject.ChainedSettableFuture<V>, AbstractConfiguredObject.DuplicateIdException, AbstractConfiguredObject.DuplicateNameException
ExchangeImpl.BindingListener
SECURED_STRING_VALUE
ALTERNATE_EXCHANGE, CLASS_DESCRIPTION
CONTEXT, CREATED_BY, CREATED_TIME, DESCRIPTION, DESIRED_STATE, DURABLE, ID, LAST_UPDATED_BY, LAST_UPDATED_TIME, LIFETIME_POLICY, NAME, OVER_SIZED_ATTRIBUTE_ALTERNATIVE_TEXT, STATE, TYPE
Constructor and Description |
---|
AbstractExchange(Map<String,Object> attributes,
VirtualHostImpl vhost) |
Modifier and Type | Method and Description |
---|---|
void |
addBinding(BindingImpl b) |
boolean |
addBinding(String bindingKey,
AMQQueue queue,
Map<String,Object> arguments) |
void |
addBindingListener(ExchangeImpl.BindingListener listener) |
void |
addCloseTask(Action<ExchangeImpl> task) |
void |
addReference(ExchangeReferrer exchange) |
Binding |
createBinding(String bindingKey,
Queue queue,
Map<String,Object> bindingArguments,
Map<String,Object> attributes) |
boolean |
deleteBinding(String bindingKey,
AMQQueue queue) |
void |
doAddBinding(BindingImpl binding) |
void |
doRemoveBinding(BindingImpl binding) |
protected abstract List<? extends BaseQueue> |
doRoute(ServerMessage message,
String routingAddress,
InstanceProperties instanceProperties) |
Exchange<?> |
getAlternateExchange() |
Map<String,Object> |
getArguments() |
BindingImpl |
getBinding(String bindingKey,
AMQQueue queue) |
long |
getBindingCount() |
long |
getBindingCountHigh() |
Collection<BindingImpl> |
getBindings() |
long |
getByteRoutes() |
long |
getBytesDropped() |
long |
getBytesIn() |
<C extends ConfiguredObject> |
getChildren(Class<C> clazz)
Return children of the ConfiguredObject of the given class
|
EventLogger |
getEventLogger() |
long |
getMessagesDropped() |
long |
getMessagesIn() |
long |
getMsgRoutes() |
Collection<Publisher> |
getPublishers() |
VirtualHostImpl |
getVirtualHost() |
boolean |
hasBinding(String bindingKey,
AMQQueue queue) |
boolean |
hasBindings()
Returns true if this exchange has at least one binding associated with it.
|
boolean |
hasReferrers() |
boolean |
isAutoDelete() |
boolean |
isBound(AMQQueue queue) |
boolean |
isBound(Map<String,Object> arguments) |
boolean |
isBound(Map<String,Object> arguments,
AMQQueue queue) |
boolean |
isBound(String bindingKey)
Determines whether a message is routing to any queue using a specific _routing key
|
boolean |
isBound(String bindingKey,
AMQQueue queue)
Determines whether a message would be isBound to a particular queue using a specific routing key
|
boolean |
isBound(String bindingKey,
Map<String,Object> arguments) |
boolean |
isBound(String bindingKey,
Map<String,Object> arguments,
AMQQueue queue)
Determines whether a message would be isBound to a particular queue using a specific routing key and arguments
|
protected abstract void |
onBind(BindingImpl binding) |
protected abstract void |
onBindingUpdated(BindingImpl binding,
Map<String,Object> oldArguments) |
protected void |
onOpen() |
protected abstract void |
onUnbind(BindingImpl binding) |
void |
onValidate()
Validation performed for configured object creation and opening.
|
com.google.common.util.concurrent.ListenableFuture<Void> |
removeBindingAsync(BindingImpl binding) |
void |
removeBindingListener(ExchangeImpl.BindingListener listener) |
void |
removeCloseTask(Action<ExchangeImpl> task) |
void |
removeReference(ExchangeReferrer exchange) |
boolean |
replaceBinding(String bindingKey,
AMQQueue queue,
Map<String,Object> arguments) |
<M extends ServerMessage<? extends StorableMessageMetaData>> |
send(M message,
String routingAddress,
InstanceProperties instanceProperties,
ServerTransaction txn,
Action<? super MessageInstance> postEnqueueAction)
Routes a message
|
String |
toString() |
addChangeListener, addChildAsync, applyToChildren, asObjectRecord, attainState, attributeSet, authoriseCreate, authoriseCreateChild, authoriseDelete, authoriseSetAttributes, beforeClose, changeAttribute, changeAttributes, childAdded, childRemoved, close, closeAsync, closeChildren, create, createAsync, createChild, createChildAsync, decryptSecrets, delete, deleteAsync, deleted, doAfter, doAfter, doAfter, doAfter, doAfter, doAfter, doAfterAlways, doAfterAlways, doCreation, doOnConfigThread, doOpening, doResolution, doSync, doSync, doValidation, findConfiguredObject, forceUpdateAllSecureAttributes, getActualAttributes, getAttainedChildById, getAttainedChildByName, getAttribute, getAttributeNames, getCategoryClass, getChildById, getChildByName, getChildExecutor, getContext, getContextKeys, getContextValue, getContextValue, getCreatedBy, getCreatedTime, getDescription, getDesiredState, getId, getLastOpenedTime, getLastUpdatedBy, getLastUpdatedTime, getLifetimePolicy, getModel, getName, getObjectFactory, getParent, getSecurityManager, getState, getStatistics, getTaskExecutor, getType, getTypeClass, handleExceptionOnOpen, isDurable, managesChildStorage, notifyStateChanged, onClose, onCreate, onExceptionInOpen, onResolve, open, openAsync, parentsMap, postResolve, postResolveChildren, registerWithParents, removeChangeListener, rethrowRuntimeExceptionsOnOpen, runTask, setAttribute, setAttributes, setAttributesAsync, setEncrypter, setState, start, startAsync, stop, validateChange, validateOnCreate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addChangeListener, asObjectRecord, close, closeAsync, createChild, createChildAsync, decryptSecrets, delete, deleteAsync, findConfiguredObject, getActualAttributes, getAttainedChildById, getAttainedChildByName, getAttribute, getAttributeNames, getCategoryClass, getChildById, getChildByName, getChildExecutor, getContext, getContextKeys, getContextValue, getContextValue, getCreatedBy, getCreatedTime, getDescription, getDesiredState, getId, getLastOpenedTime, getLastUpdatedBy, getLastUpdatedTime, getLifetimePolicy, getModel, getName, getObjectFactory, getParent, getState, getStatistics, getTaskExecutor, getType, getTypeClass, isDurable, managesChildStorage, open, openAsync, removeChangeListener, setAttribute, setAttributes, setAttributesAsync
getName
public AbstractExchange(Map<String,Object> attributes, VirtualHostImpl vhost)
public void onValidate()
AbstractConfiguredObject
onValidate
in class AbstractConfiguredObject<T extends AbstractExchange<T>>
protected void onOpen()
onOpen
in class AbstractConfiguredObject<T extends AbstractExchange<T>>
public EventLogger getEventLogger()
getEventLogger
in interface ExchangeImpl<T extends AbstractExchange<T>>
public boolean isAutoDelete()
isAutoDelete
in interface ExchangeImpl<T extends AbstractExchange<T>>
public String toString()
toString
in class AbstractConfiguredObject<T extends AbstractExchange<T>>
public VirtualHostImpl getVirtualHost()
public final boolean isBound(String bindingKey, Map<String,Object> arguments, AMQQueue queue)
ExchangeImpl
isBound
in interface ExchangeImpl<T extends AbstractExchange<T>>
public final boolean isBound(String bindingKey, AMQQueue queue)
ExchangeImpl
isBound
in interface ExchangeImpl<T extends AbstractExchange<T>>
public final boolean isBound(String bindingKey)
ExchangeImpl
isBound
in interface ExchangeImpl<T extends AbstractExchange<T>>
public final boolean isBound(AMQQueue queue)
isBound
in interface ExchangeImpl<T extends AbstractExchange<T>>
public final boolean isBound(Map<String,Object> arguments, AMQQueue queue)
isBound
in interface ExchangeImpl<T extends AbstractExchange<T>>
public final boolean isBound(Map<String,Object> arguments)
isBound
in interface ExchangeImpl<T extends AbstractExchange<T>>
public final boolean isBound(String bindingKey, Map<String,Object> arguments)
isBound
in interface ExchangeImpl<T extends AbstractExchange<T>>
public final boolean hasBindings()
ExchangeImpl
hasBindings
in interface ExchangeImpl<T extends AbstractExchange<T>>
public Exchange<?> getAlternateExchange()
getAlternateExchange
in interface Exchange<T extends AbstractExchange<T>>
public void removeReference(ExchangeReferrer exchange)
removeReference
in interface ExchangeImpl<T extends AbstractExchange<T>>
public void addReference(ExchangeReferrer exchange)
addReference
in interface ExchangeImpl<T extends AbstractExchange<T>>
public boolean hasReferrers()
hasReferrers
in interface ExchangeImpl<T extends AbstractExchange<T>>
public void addCloseTask(Action<ExchangeImpl> task)
public void removeCloseTask(Action<ExchangeImpl> task)
public final void doAddBinding(BindingImpl binding)
public long getBindingCountHigh()
public final void doRemoveBinding(BindingImpl binding)
public final Collection<BindingImpl> getBindings()
getBindings
in interface Exchange<T extends AbstractExchange<T>>
protected abstract void onBind(BindingImpl binding)
protected abstract void onUnbind(BindingImpl binding)
public long getBindingCount()
getBindingCount
in interface Exchange<T extends AbstractExchange<T>>
public final <M extends ServerMessage<? extends StorableMessageMetaData>> int send(M message, String routingAddress, InstanceProperties instanceProperties, ServerTransaction txn, Action<? super MessageInstance> postEnqueueAction)
MessageDestination
send
in interface MessageDestination
message
- the message to be routedinstanceProperties
- the instance propertiestxn
- the transaction to enqueue withinpostEnqueueAction
- action to perform on the result of every enqueue (may be null)protected abstract List<? extends BaseQueue> doRoute(ServerMessage message, String routingAddress, InstanceProperties instanceProperties)
public long getMessagesIn()
getMessagesIn
in interface Exchange<T extends AbstractExchange<T>>
public long getMsgRoutes()
public long getMessagesDropped()
getMessagesDropped
in interface Exchange<T extends AbstractExchange<T>>
public long getBytesIn()
getBytesIn
in interface Exchange<T extends AbstractExchange<T>>
public long getByteRoutes()
public long getBytesDropped()
getBytesDropped
in interface Exchange<T extends AbstractExchange<T>>
public void addBindingListener(ExchangeImpl.BindingListener listener)
public void removeBindingListener(ExchangeImpl.BindingListener listener)
public boolean addBinding(String bindingKey, AMQQueue queue, Map<String,Object> arguments)
addBinding
in interface ExchangeImpl<T extends AbstractExchange<T>>
public boolean replaceBinding(String bindingKey, AMQQueue queue, Map<String,Object> arguments)
replaceBinding
in interface ExchangeImpl<T extends AbstractExchange<T>>
public com.google.common.util.concurrent.ListenableFuture<Void> removeBindingAsync(BindingImpl binding)
removeBindingAsync
in interface ExchangeImpl<T extends AbstractExchange<T>>
public BindingImpl getBinding(String bindingKey, AMQQueue queue)
getBinding
in interface ExchangeImpl<T extends AbstractExchange<T>>
public void addBinding(BindingImpl b)
addBinding
in interface ExchangeImpl<T extends AbstractExchange<T>>
protected abstract void onBindingUpdated(BindingImpl binding, Map<String,Object> oldArguments)
public <C extends ConfiguredObject> Collection<C> getChildren(Class<C> clazz)
ConfiguredObject
getChildren
in interface ConfiguredObject<T extends AbstractExchange<T>>
getChildren
in class AbstractConfiguredObject<T extends AbstractExchange<T>>
clazz
- the class of the children to returnpublic Collection<Publisher> getPublishers()
getPublishers
in interface Exchange<T extends AbstractExchange<T>>
public boolean deleteBinding(String bindingKey, AMQQueue queue)
deleteBinding
in interface ExchangeImpl<T extends AbstractExchange<T>>
public boolean hasBinding(String bindingKey, AMQQueue queue)
hasBinding
in interface ExchangeImpl<T extends AbstractExchange<T>>
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.