Package org.activemq.message

Examples of org.activemq.message.ActiveMQDestination


     * @param ack
     * @throws JMSException
     */
    public void acknowledgeMessage(final BrokerClient client, final MessageAck ack) throws JMSException {
       
        ActiveMQDestination destination = ack.getDestination();
        if (destination == null) {
            log.warn("Ignoring acknowledgeMessage() on null destination: " + ack);
            return;
        }
        if (!destination.isQueue() || destination.isTemporary() || !ack.isPersistent())
            return;

        final DurableQueueSubscription ts = (DurableQueueSubscription) subscriptions.get(ack.getConsumerId());
        if (ts == null)
            return;
View Full Code Here


     * @param physicalName
     * @return MessageContainer
     * @throws JMSException
     */
    public MessageContainer getContainer(String physicalName) throws JMSException {
        ActiveMQDestination key = (ActiveMQDestination) destinations.get(physicalName);
        if (key != null) {
            return (MessageContainer) containers.get(key);
        }
        return null;
    }
View Full Code Here

    public Map getLocalDestinations() {
        Map localDestinations = new HashMap();
        for (Iterator iter = subscriptions.values().iterator(); iter.hasNext();) {
            DurableSubscription sub = (DurableSubscription) iter.next();
            if (sub.isLocalSubscription()) {
                final ActiveMQDestination dest = sub.getDestination();
                localDestinations.put(dest.getPhysicalName(), dest);
            }
        }
        return Collections.unmodifiableMap(localDestinations);
    }
View Full Code Here

    }
  }

  protected void closeTemporaryDestinations() throws JMSException {
    for (Iterator i = tempDestinationMap.keySet().iterator(); i.hasNext();) {
      ActiveMQDestination dest = (ActiveMQDestination) i.next();
      stopTemporaryDestination(dest);
    }
  }
View Full Code Here

  }

  protected void startAdvisoryForTempDestination(Destination d)
      throws JMSException {
    if (d != null) {
      ActiveMQDestination dest = (ActiveMQDestination) ActiveMQMessageTransformation
          .transformDestination(d);
      if (dest.isTemporary()) {
        TempDestinationAdvisor test = (TempDestinationAdvisor) validDestinationsMap
            .get(dest);
        if (test == null) {
          test = new TempDestinationAdvisor(this, dest);
          test.start();
View Full Code Here

  }

  protected void stopAdvisoryForTempDestination(ActiveMQDestination d)
      throws JMSException {
    if (d != null) {
      ActiveMQDestination dest = (ActiveMQDestination) ActiveMQMessageTransformation
          .transformDestination(d);
      if (dest.isTemporary()) {
        TempDestinationAdvisor test = (TempDestinationAdvisor) validDestinationsMap
            .remove(dest);
        if (test != null) {
          test.stop();
        }
View Full Code Here

        if (message == null) {
            return;
        }

        boolean consumed = browser ? false : messageRead;
        ActiveMQDestination destination = message.getJMSActiveMQDestination();
        boolean topic = destination != null && destination.isTopic();
        message.setTransientConsumed((!isDurableSubscriber() || !message.isPersistent()) && topic);
        this.session.afterMessageDelivered((isDurableSubscriber() || this.destination.isQueue()), message, consumed, messageExpired, beforeCalled);
        if (messageRead) {
            stats.onMessage(message);
        }
View Full Code Here

     * @param info
     * @throws JMSException
     * @throws JMSSecurityException if client authentication fails for the Destination the Consumer applies for
     */
    public void registerMessageProducer(BrokerClient client, ProducerInfo info) throws JMSException {
        ActiveMQDestination dest = info.getDestination();
        checkTempDestinationExistance(dest);
        getBroker().addMessageProducer(client, info);

        producerInfos.put(info, client);
    }
View Full Code Here

     * @param client
     * @param message
     * @throws JMSException
     */
    public void sendMessage(BrokerClient client, ActiveMQMessage message) throws JMSException {
        ActiveMQDestination dest = message.getJMSActiveMQDestination();       
        checkTempDestinationExistance(dest);
        broker.sendMessage(client, message);
    }
View Full Code Here

     * @param info
     */
    void addConnection(BrokerClient sender, ConnectionInfo info) {
        connections.remove(info);
        connections.add(info);
        ActiveMQDestination dest = ActiveMQDestination.createDestination(ActiveMQDestination.ACTIVEMQ_TOPIC,
                ActiveMQDestination.CONNECTION_ADVISORY_PREFIX);
        dispatchToBroker(sender, generateAdvisoryMessage(info, dest));
    }
View Full Code Here

TOP

Related Classes of org.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.