@SuppressWarnings("unchecked") protected ActiveMQMapMessage createMapMessage(HierarchicalStreamReader in) throws JMSException { ActiveMQMapMessage mapMsg = new ActiveMQMapMessage(); Map<String, Object> map = (Map<String, Object>) getXStream().unmarshal(in); for (String key : map.keySet()) { mapMsg.setObject(key, map.get(key)); } return mapMsg; }
@SuppressWarnings("unchecked") protected ActiveMQMapMessage createMapMessage(HierarchicalStreamReader in) throws JMSException { ActiveMQMapMessage mapMsg = new ActiveMQMapMessage(); Map<String, Object> map = (Map<String, Object>) getXStream().unmarshal(in); for (String key : map.keySet()) { mapMsg.setObject(key, map.get(key)); } return mapMsg; }
protected ActiveMQMapMessage createMapMessage(HierarchicalStreamReader in) throws JMSException { ActiveMQMapMessage mapMsg = new ActiveMQMapMessage(); Map<String, Object> map = (Map<String, Object>)getXStream().unmarshal(in); for (String key : map.keySet()) { mapMsg.setObject(key, map.get(key)); } return mapMsg; }
@SuppressWarnings("unchecked") protected ActiveMQMapMessage createMapMessage(HierarchicalStreamReader in) throws JMSException { ActiveMQMapMessage mapMsg = new ActiveMQMapMessage(); Map<String, Object> map = (Map<String, Object>) getXStream().unmarshal(in); for (String key : map.keySet()) { mapMsg.setObject(key, map.get(key)); } return mapMsg; }
protected ActiveMQObjectMessage createObjectMessage(HierarchicalStreamReader in) throws JMSException { ActiveMQObjectMessage objMsg = new ActiveMQObjectMessage(); Object obj = getXStream().unmarshal(in); objMsg.setObject((Serializable) obj); return objMsg; }
protected String marshallAdvisory(final DataStructure ds, String transformation) { StringWriter buffer = new StringWriter(); HierarchicalStreamWriter out; if (transformation.toLowerCase(Locale.ENGLISH).endsWith("json")) { out = new JettisonMappedXmlDriver().createWriter(buffer); } else { out = new PrettyPrintWriter(buffer); } XStream xstream = getXStream(); xstream.setMode(XStream.NO_REFERENCES); xstream.aliasPackage("", "org.apache.activemq.command"); xstream.marshal(ds, out); return buffer.toString(); }
protected String marshallAdvisory(final DataStructure ds, String transformation) { StringWriter buffer = new StringWriter(); HierarchicalStreamWriter out; if (transformation.toLowerCase().endsWith("json")) { out = new JettisonMappedXmlDriver().createWriter(buffer); } else { out = new PrettyPrintWriter(buffer); } XStream xstream = getXStream(); xstream.setMode(XStream.NO_REFERENCES); xstream.aliasPackage("", "org.apache.activemq.command"); xstream.marshal(ds, out); return buffer.toString(); }
protected String marshallAdvisory(final DataStructure ds, String transformation) { StringWriter buffer = new StringWriter(); HierarchicalStreamWriter out; if (transformation.toLowerCase(Locale.ENGLISH).endsWith("json")) { out = new JettisonMappedXmlDriver().createWriter(buffer); } else { out = new PrettyPrintWriter(buffer); } XStream xstream = getXStream(); xstream.setMode(XStream.NO_REFERENCES); xstream.aliasPackage("", "org.apache.activemq.command"); xstream.marshal(ds, out); return buffer.toString(); }
protected String marshallAdvisory(final DataStructure ds, String transformation) { StringWriter buffer = new StringWriter(); HierarchicalStreamWriter out; if (transformation.toLowerCase(Locale.ENGLISH).endsWith("json")) { out = new JettisonMappedXmlDriver().createWriter(buffer); } else { out = new PrettyPrintWriter(buffer); } XStream xstream = getXStream(); xstream.setMode(XStream.NO_REFERENCES); xstream.aliasPackage("", "org.apache.activemq.command"); xstream.marshal(ds, out); return buffer.toString(); }
protected ActiveMQObjectMessage createObjectMessage(HierarchicalStreamReader in) throws JMSException { ActiveMQObjectMessage objMsg = new ActiveMQObjectMessage(); Object obj = getXStream().unmarshal(in); objMsg.setObject((Serializable) obj); return objMsg; }
protected ActiveMQObjectMessage createObjectMessage(HierarchicalStreamReader in) throws JMSException { ActiveMQObjectMessage objMsg = new ActiveMQObjectMessage(); Object obj = getXStream().unmarshal(in); objMsg.setObject((Serializable) obj); return objMsg; }
protected ActiveMQObjectMessage createObjectMessage(HierarchicalStreamReader in) throws JMSException { ActiveMQObjectMessage objMsg = new ActiveMQObjectMessage(); Object obj = getXStream().unmarshal(in); objMsg.setObject((Serializable) obj); return objMsg; }
/** * Marshalls the Object to a string using XML or JSON encoding */ protected String marshall(Serializable object, String transformation) throws JMSException { StringWriter buffer = new StringWriter(); HierarchicalStreamWriter out; if (transformation.toLowerCase().endsWith("json")) { out = new JettisonMappedXmlDriver(new Configuration(), false).createWriter(buffer); } else { out = new PrettyPrintWriter(buffer); } getXStream().marshal(object, out); return buffer.toString(); }
/** * Marshal the Object to a string using XML or JSON encoding * * @param object * the object to marshal * @param transformation * the transformation to apply to the object. * * @returns the marshaled form of the given object, in JSON or XML. * * @throws JMSException if an error occurs during the marshal operation. */ protected String marshall(Serializable object, String transformation) throws JMSException { StringWriter buffer = new StringWriter(); HierarchicalStreamWriter out; if (transformation.toLowerCase(Locale.ENGLISH).endsWith("json")) { out = new JettisonMappedXmlDriver(new Configuration(), false).createWriter(buffer); } else { out = new PrettyPrintWriter(buffer); } getXStream().marshal(object, out); return buffer.toString(); }
/** * Marshal the Object to a string using XML or JSON encoding * * @param object * the object to marshal * @param transformation * the transformation to apply to the object. * * @returns the marshaled form of the given object, in JSON or XML. * * @throws JMSException if an error occurs during the marshal operation. */ protected String marshall(Serializable object, String transformation) throws JMSException { StringWriter buffer = new StringWriter(); HierarchicalStreamWriter out; if (transformation.toLowerCase(Locale.ENGLISH).endsWith("json")) { out = new JettisonMappedXmlDriver(new Configuration(), false).createWriter(buffer); } else { out = new PrettyPrintWriter(buffer); } getXStream().marshal(object, out); return buffer.toString(); }
/** * Marshal the Object to a string using XML or JSON encoding * * @param object * the object to marshal * @param transformation * the transformation to apply to the object. * * @returns the marshaled form of the given object, in JSON or XML. * * @throws JMSException if an error occurs during the marshal operation. */ protected String marshall(Serializable object, String transformation) throws JMSException { StringWriter buffer = new StringWriter(); HierarchicalStreamWriter out; if (transformation.toLowerCase(Locale.ENGLISH).endsWith("json")) { out = new JettisonMappedXmlDriver(new Configuration(), false).createWriter(buffer); } else { out = new PrettyPrintWriter(buffer); } getXStream().marshal(object, out); return buffer.toString(); }