public static byte[] getJMSCorrelationIDAsBytes(Message message) { Object obj = message.getObjectProperty(CORRELATIONID_HEADER_NAME); if (obj instanceof byte[]) { return (byte[]) obj; } else { return null; } }
/** * @return Returns the message properties in Map form, useful when encoding to JSON */ default Map<String, Object> toPropertyMap() { Map map = new HashMap<>(); for (SimpleString name : getPropertyNames()) { Object value = getObjectProperty(name.toString()); //some property is SimpleString, which is not available for management console if (value instanceof SimpleString) { value = value.toString(); } map.put(name.toString(), value); } return map; }
public static byte[] getJMSCorrelationIDAsBytes(Message message) { Object obj = message.getObjectProperty(CORRELATIONID_HEADER_NAME); if (obj instanceof byte[]) { return (byte[]) obj; } else { return null; } }
public static byte[] getJMSCorrelationIDAsBytes(Message message) { Object obj = message.getObjectProperty(CORRELATIONID_HEADER_NAME); if (obj instanceof byte[]) { return (byte[]) obj; } else { return null; } }
public static byte[] getJMSCorrelationIDAsBytes(Message message) { Object obj = message.getObjectProperty(CORRELATIONID_HEADER_NAME); if (obj instanceof byte[]) { return (byte[]) obj; } else { return null; } }
public static byte[] getJMSCorrelationIDAsBytes(Message message) { Object obj = message.getObjectProperty(CORRELATIONID_HEADER_NAME); if (obj instanceof byte[]) { return (byte[]) obj; } else { return null; } }
public static byte[] getJMSCorrelationIDAsBytes(Message message) { Object obj = message.getObjectProperty(CORRELATIONID_HEADER_NAME); if (obj instanceof byte[]) { return (byte[]) obj; } else { return null; } }
public static byte[] getJMSCorrelationIDAsBytes(Message message) { Object obj = message.getObjectProperty(CORRELATIONID_HEADER_NAME); if (obj instanceof byte[]) { return (byte[]) obj; } else { return null; } }
private void internalComputeMessage(Map<String, Long> result, Filter filter, SimpleString groupByProperty, Message message) { if (filter == null || filter.match(message)) { if (groupByProperty == null) { result.compute(null, (k, v) -> v == null ? 1 : ++v); } else { Object value = message.getObjectProperty(groupByProperty); String valueStr = value == null ? null : value.toString(); result.compute(valueStr, (k, v) -> v == null ? 1 : ++v); } } }
public static Object getObjectProperty(final Message message, final String name) { final Object val; if (MessageUtil.JMSXGROUPID.equals(name)) { val = message.getGroupID(); } else if (MessageUtil.JMSXGROUPSEQ.equals(name)) { val = message.getGroupSequence(); } else if (MessageUtil.JMSXUSERID.equals(name)) { val = message.getValidatedUserID(); } else { val = message.getObjectProperty(name); } if (val instanceof SimpleString) { return val.toString(); } return val; }
public static Object getObjectProperty(final Message message, final String name) { final Object val; if (MessageUtil.JMSXGROUPID.equals(name)) { val = message.getGroupID(); } else if (MessageUtil.JMSXGROUPSEQ.equals(name)) { val = message.getGroupSequence(); } else if (MessageUtil.JMSXUSERID.equals(name)) { val = message.getValidatedUserID(); } else { val = message.getObjectProperty(name); } if (val instanceof SimpleString) { return val.toString(); } return val; }
public void printMessageProperties(Message message) throws XMLStreamException { xmlWriter.writeStartElement(XmlDataConstants.PROPERTIES_PARENT); for (SimpleString key : message.getPropertyNames()) { Object value = message.getObjectProperty(key); xmlWriter.writeEmptyElement(XmlDataConstants.PROPERTIES_CHILD); xmlWriter.writeAttribute(XmlDataConstants.PROPERTY_NAME, key.toString()); xmlWriter.writeAttribute(XmlDataConstants.PROPERTY_VALUE, XmlDataExporterUtil.convertProperty(value)); // Write the property type as an attribute String propertyType = XmlDataExporterUtil.getPropertyType(value); if (propertyType != null) { xmlWriter.writeAttribute(XmlDataConstants.PROPERTY_TYPE, propertyType); } } xmlWriter.writeEndElement(); // end PROPERTIES_PARENT }
/** * @return Returns the message properties in Map form, useful when encoding to JSON */ default Map<String, Object> toPropertyMap() { Map map = new HashMap<>(); for (SimpleString name : getPropertyNames()) { Object value = getObjectProperty(name.toString()); //some property is SimpleString, which is not available for management console if (value instanceof SimpleString) { value = value.toString(); } map.put(name.toString(), value); } return map; }
public void printMessageProperties(Message message) throws XMLStreamException { xmlWriter.writeStartElement(XmlDataConstants.PROPERTIES_PARENT); for (SimpleString key : message.getPropertyNames()) { Object value = message.getObjectProperty(key); xmlWriter.writeEmptyElement(XmlDataConstants.PROPERTIES_CHILD); xmlWriter.writeAttribute(XmlDataConstants.PROPERTY_NAME, key.toString()); xmlWriter.writeAttribute(XmlDataConstants.PROPERTY_VALUE, XmlDataExporterUtil.convertProperty(value)); // Write the property type as an attribute String propertyType = XmlDataExporterUtil.getPropertyType(value); if (propertyType != null) { xmlWriter.writeAttribute(XmlDataConstants.PROPERTY_TYPE, propertyType); } } xmlWriter.writeEndElement(); // end PROPERTIES_PARENT }
/** * @return Returns the message properties in Map form, useful when encoding to JSON */ default Map<String, Object> toPropertyMap() { Map map = new HashMap<>(); for (SimpleString name : getPropertyNames()) { Object value = getObjectProperty(name.toString()); //some property is SimpleString, which is not available for management console if (value instanceof SimpleString) { value = value.toString(); } map.put(name.toString(), value); } return map; }
/** * @return Returns the message properties in Map form, useful when encoding to JSON */ default Map<String, Object> toPropertyMap() { Map map = new HashMap<>(); for (SimpleString name : getPropertyNames()) { Object value = getObjectProperty(name.toString()); //some property is SimpleString, which is not available for management console if (value instanceof SimpleString) { value = value.toString(); } map.put(name.toString(), value); } return map; }
/** * @return Returns the message properties in Map form, useful when encoding to JSON */ default Map<String, Object> toPropertyMap() { Map map = new HashMap<>(); for (SimpleString name : getPropertyNames()) { Object value = getObjectProperty(name.toString()); //some property is SimpleString, which is not available for management console if (value instanceof SimpleString) { value = value.toString(); } map.put(name.toString(), value); } return map; }
/** * @return Returns the message properties in Map form, useful when encoding to JSON */ default Map<String, Object> toPropertyMap() { Map map = new HashMap<>(); for (SimpleString name : getPropertyNames()) { Object value = getObjectProperty(name.toString()); //some property is SimpleString, which is not available for management console if (value instanceof SimpleString) { value = value.toString(); } map.put(name.toString(), value); } return map; }
/** * @return Returns the message properties in Map form, useful when encoding to JSON */ default Map<String, Object> toPropertyMap() { Map map = new HashMap<>(); for (SimpleString name : getPropertyNames()) { Object value = getObjectProperty(name.toString()); //some property is SimpleString, which is not available for management console if (value instanceof SimpleString) { value = value.toString(); } map.put(name.toString(), value); } return map; }
@Override public boolean match(final Message message) { if (headerName != null) { Object value = message.getObjectProperty(headerName); if (value instanceof SimpleString) { value = ((SimpleString) value).toString(); } if (value != null && headerValue.equals(value)) { return true; } return false; } return true; }