@Override public Object getObjectProperty(String name) { try { SimpleString key = new SimpleString(name); Object property = properties.getProperty(key); if (stringPropertyNames.contains(key)) { property = property.toString(); } return property; } catch (HornetQPropertyConversionException ce) { throw new MessageFormatRuntimeException(ce.getMessage()); } catch (RuntimeException e) { throw new JMSRuntimeException(e.getMessage()); } }
public Map<String, Object> toMap() { Map<String, Object> map = new HashMap<String, Object>(); map.put("messageID", messageID); if (userID != null) { map.put("userID", "ID:" + userID.toString()); } map.put("address", address.toString()); map.put("type", type); map.put("durable", durable); map.put("expiration", expiration); map.put("timestamp", timestamp); map.put("priority", priority); for (SimpleString propName : properties.getPropertyNames()) { map.put(propName.toString(), properties.getProperty(propName)); } return map; }
public Object getObjectProperty(final String key) { return properties.getProperty(new SimpleString(key)); }
/** * Sets all properties we carry onto the message. * * @param message * @throws JMSException */ private void setProperties(Message message) throws JMSException { for (SimpleString name : properties.getPropertyNames()) { message.setObjectProperty(name.toString(), properties.getProperty(name)); } }