Package org.codehaus.activemq.message

Examples of org.codehaus.activemq.message.ActiveMQDestination


     * @param client
     * @param message
     * @throws javax.jms.JMSException
     */
    public void sendMessage(BrokerClient client, ActiveMQMessage message) throws JMSException {
        ActiveMQDestination destination = message.getJMSActiveMQDestination();
        if (destination != null && destination.isTopic()) {
            MessageContainer container = null;
            if (log.isDebugEnabled()) {
                log.debug("Dispaching to " + subscriptionContainer + " subscriptions with message: " + message);
            }
            Set subscriptions = subscriptionContainer.getSubscriptions(destination);
View Full Code Here


     * @param client
     * @param message
     * @throws javax.jms.JMSException
     */
    public void sendMessage(BrokerClient client, ActiveMQMessage message) throws JMSException {
        ActiveMQDestination dest = (ActiveMQDestination) message.getJMSDestination();
      // Are we not intrested in handling that destination?
        if( !isManagerFor(dest, message.getJMSDeliveryMode()==DeliveryMode.PERSISTENT) ) {
          return;
        }
       
View Full Code Here

            else {
                updateActiveSubscriptions(container, sub);
            }
        }
       
        ActiveMQDestination key = new ActiveMQQueue(destinationName);
        destinationMap.put(key, container);
        return container;
    }
View Full Code Here

    public synchronized Set get(ActiveMQDestination key) {
        if (key.isComposite()) {
            List childDestinations = key.getChildDestinations();
            Set answer = new HashSet(childDestinations.size());
            for (Iterator iter = childDestinations.iterator(); iter.hasNext();) {
                ActiveMQDestination childDestination = (ActiveMQDestination) iter.next();
                Object value = get(childDestination);
                if (value instanceof Set) {
                    answer.addAll((Set) value);
                }
                else if (value != null) {
View Full Code Here

     */
    public synchronized void put(ActiveMQDestination key, Object value) {
        if (key.isComposite()) {
            List childDestinations = key.getChildDestinations();
            for (Iterator iter = childDestinations.iterator(); iter.hasNext();) {
                ActiveMQDestination childDestination = (ActiveMQDestination) iter.next();
                put(childDestination, value);
            }
            return;
        }
        String[] paths = key.getDestinationPaths();
View Full Code Here

     */
    public synchronized void remove(ActiveMQDestination key, Object value) {
        if (key.isComposite()) {
            List childDestinations = key.getChildDestinations();
            for (Iterator iter = childDestinations.iterator(); iter.hasNext();) {
                ActiveMQDestination childDestination = (ActiveMQDestination) iter.next();
                remove(childDestination, value);
            }
            return;
        }
        String[] paths = key.getDestinationPaths();
View Full Code Here

     */
    public void removeAll(ActiveMQDestination key) {
        if (key.isComposite()) {
            List childDestinations = key.getChildDestinations();
            for (Iterator iter = childDestinations.iterator(); iter.hasNext();) {
                ActiveMQDestination childDestination = (ActiveMQDestination) iter.next();
                removeAll(childDestination);
            }
            return;
        }
        String[] paths = key.getDestinationPaths();
View Full Code Here

   
    private void validateContainsWildCards(ActiveMQDestination key){
        if (containsWildCards && key.isWildcard()){
            containsWildCards = false;
            for (Iterator i = vanillaDestinations.keySet().iterator(); i.hasNext();){
                ActiveMQDestination dest = (ActiveMQDestination)i.next();
                if (dest.isWildcard()){
                    containsWildCards = true;
                    break;
                }
            }
        }
View Full Code Here

            throw new JMSException("No messageID specified for the Message");
        }
       
        associateTransaction(message);
        try {       
          ActiveMQDestination destination = message.getJMSActiveMQDestination();
          if (destination.isComposite()) {
              boolean first = true;
 
              for (Iterator iter = destination.getChildDestinations().iterator(); iter.hasNext();) {
                  ActiveMQDestination childDestination = (ActiveMQDestination) iter.next();
 
                  // lets shallow copy just in case
                  if (first) {
                      first = false;
                  }
View Full Code Here

    protected void doMessageSend(BrokerClient client, ActiveMQMessage message) throws JMSException {
        if (securityAdapter != null) {
            securityAdapter.authorizeSendMessage(client, message);
        }
        ActiveMQDestination dest = message.getJMSActiveMQDestination();
        if (dest.isTopic()){
            if (message.isPersistent() && !dest.isTemporary()){
                persistentTopicMCM.sendMessage(client,message);
            }
            transientTopicMCM.sendMessage(client, message);
        }else {
            transientQueueMCM.sendMessage(client, message);
View Full Code Here

TOP

Related Classes of org.codehaus.activemq.message.ActiveMQDestination

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.