@Override public Set<Destination> getDestinations(ActiveMQDestination destination) { return getNext().getDestinations(destination); }
@Override public ActiveMQDestination[] getDestinations() throws Exception { return getNext().getDestinations(); }
/** * Retrieve a set of all Destinations be used by the Broker * @return all Destinations */ public Set<ActiveMQDestination> getDestinations(){ Set<ActiveMQDestination> result; try { ActiveMQDestination[] destinations = brokerService.getBroker().getDestinations(); result = new HashSet<ActiveMQDestination>(); Collections.addAll(result, destinations); }catch (Exception e){ result = Collections.emptySet(); } return result; }
public static boolean isPrioritizedMessageSubscriber(Broker broker,Subscription sub) { boolean result = false; Set<Destination> destinations = broker.getDestinations(sub.getActiveMQDestination()); if (destinations != null) { for (Destination dest:destinations) { if (dest.isPrioritizedMessages()) { result = true; break; } } } return result; }
@Override public void start() throws Exception { super.start(); if (location == null) { location = new File(getBrokerService().getBrokerDataDirectory(), "destinations"); } importDestinations(); destinations.addAll(Arrays.asList(getBrokerService().getBroker().getDestinations())); }
/** * Sends a message to the given destination which may be a wildcard * * @param context broker context * @param message message to send * @param destination possibly wildcard destination to send the message to * @throws Exception on error */ protected void send(ProducerBrokerExchange context, Message message, ActiveMQDestination destination) throws Exception { Broker broker = context.getConnectionContext().getBroker(); Set<Destination> destinations = broker.getDestinations(destination); for (Destination dest : destinations) { dest.send(context, message.copy()); } }
@Override protected void send(final ProducerBrokerExchange context, final Message message, ActiveMQDestination destination) throws Exception { final Broker broker = context.getConnectionContext().getBroker(); final Set<Destination> destinations = broker.getDestinations(destination); final int numDestinations = destinations.size();
Set<Destination> destsToPause = regionBroker.getDestinations(dest); try { for (Destination d: destsToPause) { ActiveMQDestination originalDestination = m.getMessage().getOriginalDestination(); if (originalDestination != null) { for (Destination destination : regionBroker.getDestinations(originalDestination)) { DeadLetterStrategy strategy = destination.getDeadLetterStrategy(); strategy.rollback(m.getMessage());
@Override public ActiveMQDestination[] getDestinations() throws Exception { return getNext().getDestinations(); }
@Override public Set<Destination> getDestinations(ActiveMQDestination destination) { return getNext().getDestinations(destination); }
@Override public Set<Destination> getDestinations(ActiveMQDestination destination) { return getNext().getDestinations(destination); }
@Override public Set<Destination> getDestinations(ActiveMQDestination destination) { return getNext().getDestinations(destination); }
/** * Retrieve a set of all Destinations be used by the Broker * @return all Destinations */ public Set<ActiveMQDestination> getDestinations(){ Set<ActiveMQDestination> result; try { ActiveMQDestination[] destinations = brokerService.getBroker().getDestinations(); result = new HashSet<ActiveMQDestination>(); Collections.addAll(result, destinations); }catch (Exception e){ result = Collections.emptySet(); } return result; }
@Override public ActiveMQDestination[] getDestinations() throws Exception { return getNext().getDestinations(); }
public static boolean isPrioritizedMessageSubscriber(Broker broker,Subscription sub) { boolean result = false; Set<Destination> destinations = broker.getDestinations(sub.getActiveMQDestination()); if (destinations != null) { for (Destination dest:destinations) { if (dest.isPrioritizedMessages()) { result = true; break; } } } return result; }
@Override public void start() throws Exception { super.start(); if (location == null) { location = new File(getBrokerService().getBrokerDataDirectory(), "destinations"); } importDestinations(); destinations.addAll(Arrays.asList(getBrokerService().getBroker().getDestinations())); }
@Override public void start() throws Exception { super.start(); if (location == null) { location = new File(getBrokerService().getBrokerDataDirectory(), "destinations"); } importDestinations(); destinations.addAll(Arrays.asList(getBrokerService().getBroker().getDestinations())); }
@Override public void start() throws Exception { super.start(); if (location == null) { location = new File(getBrokerService().getBrokerDataDirectory(), "destinations"); } importDestinations(); destinations.addAll(Arrays.asList(getBrokerService().getBroker().getDestinations())); }
/** * Sends a message to the given destination which may be a wildcard * * @param context broker context * @param message message to send * @param destination possibly wildcard destination to send the message to * @throws Exception on error */ protected void send(ProducerBrokerExchange context, Message message, ActiveMQDestination destination) throws Exception { Broker broker = context.getConnectionContext().getBroker(); Set<Destination> destinations = broker.getDestinations(destination); for (Destination dest : destinations) { dest.send(context, message.copy()); } }
public void create(Broker broker, ConnectionContext context, ActiveMQDestination destination) throws Exception { if (destination.isQueue() && destination.isPattern() && broker.getDestinations(destination).isEmpty()) { DestinationFilter filter = DestinationFilter.parseFilter(new ActiveMQQueue(prefix + DestinationFilter.ANY_DESCENDENT)); if (filter.matches(destination)) { broker.addDestination(context, destination, false); } } }