public Destination intercept(Destination destination) { for (int i = 0; i < interceptors.length; i++) { destination = interceptors[i].intercept(destination); } return destination; }
@Override public void reapplyInterceptor() { destinationsLock.writeLock().lock(); try { DestinationInterceptor destinationInterceptor = broker.getDestinationInterceptor(); Map<ActiveMQDestination, Destination> map = getDestinationMap(); for (ActiveMQDestination key : map.keySet()) { Destination destination = map.get(key); if (destination instanceof CompositeDestinationFilter) { destination = ((CompositeDestinationFilter) destination).next; } if (destinationInterceptor != null) { destination = destinationInterceptor.intercept(destination); } getDestinationMap().put(key, destination); Destination prev = destinations.put(key, destination); if (prev == null) { updateRegionDestCounts(key, 1); } } } finally { destinationsLock.writeLock().unlock(); } } }
dest = destinationInterceptor.intercept(dest);
public Destination intercept(Destination destination) { for (int i = 0; i < interceptors.length; i++) { destination = interceptors[i].intercept(destination); } return destination; }
public Destination intercept(Destination destination) { for (int i = 0; i < interceptors.length; i++) { destination = interceptors[i].intercept(destination); } return destination; }
public Destination intercept(Destination destination) { for (int i = 0; i < interceptors.length; i++) { destination = interceptors[i].intercept(destination); } return destination; }
public Destination intercept(Destination destination) { for (int i = 0; i < interceptors.length; i++) { destination = interceptors[i].intercept(destination); } return destination; }
@Override public void reapplyInterceptor() { destinationsLock.writeLock().lock(); try { DestinationInterceptor destinationInterceptor = broker.getDestinationInterceptor(); Map<ActiveMQDestination, Destination> map = getDestinationMap(); for (ActiveMQDestination key : map.keySet()) { Destination destination = map.get(key); if (destination instanceof CompositeDestinationFilter) { destination = ((CompositeDestinationFilter) destination).next; } if (destinationInterceptor != null) { destination = destinationInterceptor.intercept(destination); } getDestinationMap().put(key, destination); Destination prev = destinations.put(key, destination); if (prev == null) { updateRegionDestCounts(key, 1); } } } finally { destinationsLock.writeLock().unlock(); } } }
@Override public void reapplyInterceptor() { destinationsLock.writeLock().lock(); try { DestinationInterceptor destinationInterceptor = broker.getDestinationInterceptor(); Map<ActiveMQDestination, Destination> map = getDestinationMap(); for (ActiveMQDestination key : map.keySet()) { Destination destination = map.get(key); if (destination instanceof CompositeDestinationFilter) { destination = ((CompositeDestinationFilter) destination).next; } if (destinationInterceptor != null) { destination = destinationInterceptor.intercept(destination); } getDestinationMap().put(key, destination); Destination prev = destinations.put(key, destination); if (prev == null) { updateRegionDestCounts(key, 1); } } } finally { destinationsLock.writeLock().unlock(); } } }
@Override public void reapplyInterceptor() { destinationsLock.writeLock().lock(); try { DestinationInterceptor destinationInterceptor = broker.getDestinationInterceptor(); Map<ActiveMQDestination, Destination> map = getDestinationMap(); for (ActiveMQDestination key : map.keySet()) { Destination destination = map.get(key); if (destination instanceof CompositeDestinationFilter) { destination = ((CompositeDestinationFilter) destination).next; } if (destinationInterceptor != null) { destination = destinationInterceptor.intercept(destination); } getDestinationMap().put(key, destination); Destination prev = destinations.put(key, destination); if (prev == null) { updateRegionDestCounts(key, 1); } } } finally { destinationsLock.writeLock().unlock(); } } }
public Destination addDestination(ConnectionContext context, ActiveMQDestination destination, boolean createIfTemporary) throws Exception { LOG.debug(broker.getBrokerName() + " adding destination: " + destination); synchronized (destinationsMutex) { Destination dest = destinations.get(destination); if (dest == null) { if (destination.isTemporary() == false || createIfTemporary) { dest = createDestination(context, destination); // intercept if there is a valid interceptor defined DestinationInterceptor destinationInterceptor = broker.getDestinationInterceptor(); if (destinationInterceptor != null) { dest = destinationInterceptor.intercept(dest); } dest.start(); destinations.put(destination, dest); destinationMap.put(destination, dest); addSubscriptionsForDestination(context, dest); } if (dest == null) { throw new JMSException("The destination " + destination + " does not exist."); } } return dest; } }
dest = destinationInterceptor.intercept(dest);
dest = destinationInterceptor.intercept(dest);
dest = destinationInterceptor.intercept(dest);