* @return Generated attributes {@link OperationMap}
* @throws JMSException if any occurs by accessing {@code message} properties
*/
static OperationMap extractMessageProperties(Operation op, Message message, ObscuredValueMarker marker, Collection<String> nameSet)
throws JMSException {
OperationMap attributesMap = op.createMap(MESSAGE_PROPERTIES);
Enumeration<?> propertyNames = message.getPropertyNames();
if (propertyNames != null) {
Object host = message.getObjectProperty("host");
Object port = message.getObjectProperty("port");
if (host != null && port != null) {
OperationMap connectionData = op.createMap(CONNECTION_DATA);
int _port;
try {
_port = Integer.parseInt(String.valueOf(port));
} catch (NumberFormatException e) {
_port = -1;
}
connectionData.put("port", _port);
connectionData.put("host", String.valueOf(host));
}
for (Enumeration<?> propertyNameEnum = propertyNames; propertyNameEnum.hasMoreElements(); ) {
String propertyName = (String) propertyNameEnum.nextElement();
Object propertyValue = message.getObjectProperty(propertyName);