private Exchange<?> getExchange(NamedAddressSpace addressSpace, String exchangeName) { MessageDestination destination = addressSpace.getAttainedMessageDestination(exchangeName); return destination instanceof Exchange ? (Exchange<?>) destination : null; }
private Exchange<?> getExchange(String name) { MessageDestination destination = getAddressSpace().getAttainedMessageDestination(name); return destination instanceof Exchange ? (Exchange<?>) destination : null; }
private void validateAlternateExchangeIsNotQueue(final NamedAddressSpace addressSpace, final String alternateExchangeName) { MessageDestination alternateMessageDestination = addressSpace.getAttainedMessageDestination(alternateExchangeName, false); if (alternateMessageDestination != null && !(alternateMessageDestination instanceof Exchange)) { throw new IllegalConfigurationException(String.format( "Alternate exchange '%s' is not a destination of type 'exchange'.", alternateExchangeName)); } }
private void validateAlternateExchangeIsNotQueue(final NamedAddressSpace addressSpace, final String alternateExchangeName) { MessageDestination alternateMessageDestination = addressSpace.getAttainedMessageDestination(alternateExchangeName, false); if (alternateMessageDestination != null && !(alternateMessageDestination instanceof Exchange)) { throw new IllegalConfigurationException(String.format( "Alternate exchange '%s' is not a destination of type 'exchange'.", alternateExchangeName)); } }
private Exchange<?> getExchange(String name) { MessageDestination destination = getAddressSpace().getAttainedMessageDestination(name); return destination instanceof Exchange ? (Exchange<?>) destination : null; }
if (!localRoutingAddress.contains("/")) destination = addressSpace.getAttainedMessageDestination(localRoutingAddress); if (destination != null) destination = addressSpace.getAttainedMessageDestination(parts[0]); if (destination instanceof Exchange)
destination = vHost.getAttainedMessageDestination(exchangeName.toString());
if(xfr.hasDestination()) destination = addressSpace.getAttainedMessageDestination(xfr.getDestination()); if(destination == null) && xfr.getHeader().getDeliveryProperties().getExchange() != null) destination = addressSpace.getAttainedMessageDestination(xfr.getHeader().getDeliveryProperties().getExchange());
replyCode = virtualHost.getAttainedMessageDestination(routingKey.toString()) instanceof Queue ? ExchangeBoundOkBody.OK : ExchangeBoundOkBody.NO_QUEUE_BOUND_WITH_RK; MessageDestination destination = virtualHost.getAttainedMessageDestination(queueName.toString()); Queue<?> queue = destination instanceof Queue ? (Queue) destination : null; if (queue == null)