Package org.activemq.message

Examples of org.activemq.message.ActiveMQObjectMessage


      TempDestinationAdvisoryEvent event = (TempDestinationAdvisoryEvent) tempDestinationMap
          .get(dest);
      if (event == null) {
        event = new TempDestinationAdvisoryEvent(dest, true);
        tempDestinationMap.put(dest, event);
        ActiveMQObjectMessage msg = new ActiveMQObjectMessage();
        msg.setObject(event);
        msg.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT);
        msg.setJMSDestination(dest.getTopicForTempAdvisory());
        msg.setJMSMessageID("ID:" + dest.getPhysicalName()
            + " .started");
        this.syncSendPacket(msg);
      }
    }
  }
View Full Code Here


    if (dest != null && dest.isTemporary()) {
      TempDestinationAdvisoryEvent event = (TempDestinationAdvisoryEvent) tempDestinationMap
          .remove(dest);
      if (event != null) {
        event.setStarted(false);
        ActiveMQObjectMessage msg = new ActiveMQObjectMessage();
        msg.setObject(event);
        msg.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT);
        msg.setJMSDestination(dest.getTopicForTempAdvisory());
        msg.setJMSMessageID("ID:" + dest.getPhysicalName()
            + " .stopped");
        this.syncSendPacket(msg);
      }
    }
  }
View Full Code Here

      TempDestinationAdvisoryEvent event = (TempDestinationAdvisoryEvent) tempDestinationMap
          .get(dest);
      if (event == null) {
        event = new TempDestinationAdvisoryEvent(dest, true);
        tempDestinationMap.put(dest, event);
        ActiveMQObjectMessage msg = new ActiveMQObjectMessage();
        msg.setObject(event);
        msg.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT);
        msg.setJMSDestination(dest.getTopicForTempAdvisory());
        msg.setJMSMessageID("ID:" + dest.getPhysicalName()
            + " .started");
        this.syncSendPacket(msg);
      }
    }
  }
View Full Code Here

    if (dest != null && dest.isTemporary()) {
      TempDestinationAdvisoryEvent event = (TempDestinationAdvisoryEvent) tempDestinationMap
          .remove(dest);
      if (event != null) {
        event.setStarted(false);
        ActiveMQObjectMessage msg = new ActiveMQObjectMessage();
        msg.setObject(event);
        msg.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT);
        msg.setJMSDestination(dest.getTopicForTempAdvisory());
        msg.setJMSMessageID("ID:" + dest.getPhysicalName()
            + " .stopped");
        this.syncSendPacket(msg);
      }
    }
  }
View Full Code Here

     * @return an ActiveMQObjectMessage
     * @throws JMSException if the JMS provider fails to create this message due to some internal error.
     */
    public ObjectMessage createObjectMessage() throws JMSException {
        checkClosed();
        return new ActiveMQObjectMessage();
    }
View Full Code Here

     * @return an ActiveMQObjectMessage
     * @throws JMSException if the JMS provider fails to create this message due to some internal error.
     */
    public ObjectMessage createObjectMessage(Serializable object) throws JMSException {
        checkClosed();
        ActiveMQObjectMessage msg = new ActiveMQObjectMessage();
        msg.setObject(object);
        return msg;
    }
View Full Code Here

      TempDestinationAdvisoryEvent event = (TempDestinationAdvisoryEvent) tempDestinationMap
          .get(dest);
      if (event == null) {
        event = new TempDestinationAdvisoryEvent(dest, true);
        tempDestinationMap.put(dest, event);
        ActiveMQObjectMessage msg = new ActiveMQObjectMessage();
        msg.setObject(event);
        msg.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT);
        msg.setJMSDestination(dest.getTopicForTempAdvisory());
        msg.setJMSMessageID("ID:" + dest.getPhysicalName()
            + " .started");
        this.syncSendPacket(msg);
      }
    }
  }
View Full Code Here

    if (dest != null && dest.isTemporary()) {
      TempDestinationAdvisoryEvent event = (TempDestinationAdvisoryEvent) tempDestinationMap
          .remove(dest);
      if (event != null) {
        event.setStarted(false);
        ActiveMQObjectMessage msg = new ActiveMQObjectMessage();
        msg.setObject(event);
        msg.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT);
        msg.setJMSDestination(dest.getTopicForTempAdvisory());
        msg.setJMSMessageID("ID:" + dest.getPhysicalName()
            + " .stopped");
        this.syncSendPacket(msg);
      }
    }
  }
View Full Code Here

     * @param destination
     * @return create ActiveMQMessage
     */
    private ActiveMQMessage generateAdvisoryMessage(final ConsumerInfo advisoryTarget, final Packet payload,
            final ActiveMQDestination destination) {
        ActiveMQObjectMessage advisoryMsg = null;
        try {
            advisoryMsg = new ActiveMQObjectMessage();
            advisoryMsg.setJMSMessageID(idGen.generateId());
            advisoryMsg.setJMSDestination(destination);
            advisoryMsg.setExternalMessageId(true);
            advisoryMsg.setDeliveryCount(DeliveryMode.NON_PERSISTENT);
            advisoryMsg.setObject((Serializable) payload);
            if (advisoryTarget != null) {
                advisoryMsg.setConsumerNos(new int[]{advisoryTarget.getConsumerNo()});
            }
        }
        catch (JMSException e) {
            advisoryMsg = null;
            log.warn("caught an exception generating an advisory", e);
View Full Code Here

      TempDestinationAdvisoryEvent event = (TempDestinationAdvisoryEvent) tempDestinationMap
          .get(dest);
      if (event == null) {
        event = new TempDestinationAdvisoryEvent(dest, true);
        tempDestinationMap.put(dest, event);
        ActiveMQObjectMessage msg = new ActiveMQObjectMessage();
        msg.setObject(event);
        msg.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT);
        msg.setJMSDestination(dest.getTopicForTempAdvisory());
        msg.setJMSMessageID("ID:" + dest.getPhysicalName()
            + " .started");
        this.syncSendPacket(msg);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.activemq.message.ActiveMQObjectMessage

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.