Package hermes.xml

Examples of hermes.xml.Entry


      Set<XMLMessage> toRemove = new HashSet<XMLMessage>();

      for (Iterator<Entry> iter = xmlMessages.getEntry().iterator(); iter.hasNext();) {
        XMLMessage xmlMessage = null;
        Entry entry = iter.next();
        if (entry.getBytesMessage() != null) {
          xmlMessage = entry.getBytesMessage();
        } else if (entry.getTextMessage() != null) {
          xmlMessage = entry.getTextMessage();
        } else if (entry.getMapMessage() != null) {
          xmlMessage = entry.getMapMessage();
        } else if (entry.getObjectMessage() != null) {
          xmlMessage = entry.getObjectMessage();
        }

        if (xmlMessage != null) {
          if (messageIds.contains(xmlMessage.getJMSMessageID())) {
            iter.remove();
View Full Code Here


      read() ;
    }
   
    for (int i = 0 ; i < xmlMessages.getEntry().size() ; i++) {
      XMLMessage xmlMessage = null;
      Entry entry = xmlMessages.getEntry().get(i) ;
      if (entry.getBytesMessage() != null) {
        xmlMessage = entry.getBytesMessage();
      } else if (entry.getTextMessage() != null) {
        xmlMessage = entry.getTextMessage();
      } else if (entry.getMapMessage() != null) {
        xmlMessage = entry.getMapMessage();
      } else if (entry.getObjectMessage() != null) {
        xmlMessage = entry.getObjectMessage();
      }

      // ikky but whatever.
     
      if (xmlMessage != null) {
View Full Code Here

  public Collection fromMessageSet(MessageFactory hermes, MessageSet messageSet) throws JMSException, IOException, ClassNotFoundException, DecoderException {
    Collection rval = new ArrayList();

    for (Iterator iter = messageSet.getEntry().iterator(); iter.hasNext();) {
      Entry entry = (Entry) iter.next();
      Message jmsMessage = null;

      switch (entry.getType()) {
      case XML_TEXT_MESSAGE:
        jmsMessage = createMessage(hermes, entry.getTextMessage());
        break;

      case XML_MAP_MESSAGE:
        jmsMessage = createMessage(hermes, entry.getMapMessage());
        break;

      case XML_BYTES_MESSGAE:
        jmsMessage = createMessage(hermes, entry.getBytesMessage());
        break;
      case XML_OBJECT_MESSAGE:
        jmsMessage = createMessage(hermes, entry.getObjectMessage());
        break;

      }

      if (jmsMessage != null) {
View Full Code Here

    try {
      MessageSet messageSet = factory.createMessageSet();

      for (Iterator iter = messages.iterator(); iter.hasNext();) {
        Message jmsMessage = (Message) iter.next();
        Entry entry = factory.createEntry();
        XMLMessage xmlMessage = createXMLMessage(factory, jmsMessage);

        if (xmlMessage instanceof XMLTextMessage) {
          entry.setType(XML_TEXT_MESSAGE);
          entry.setTextMessage((XMLTextMessage) xmlMessage);

        } else if (xmlMessage instanceof XMLMapMessage) {
          entry.setType(XML_MAP_MESSAGE);
          entry.setMapMessage((XMLMapMessage) xmlMessage);

        } else if (xmlMessage instanceof XMLObjectMessage) {
          entry.setType(XML_OBJECT_MESSAGE);
          entry.setObjectMessage((XMLObjectMessage) xmlMessage);
        } else if (xmlMessage instanceof XMLBytesMessage) {
          entry.setType(XML_BYTES_MESSGAE);
          entry.setBytesMessage((XMLBytesMessage) xmlMessage);

        }

        messageSet.getEntry().add(entry);
      }
View Full Code Here

TOP

Related Classes of hermes.xml.Entry

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.