org.apache.servicemix.components.util.xstream
Class XStreamMarshaler
java.lang.Object
org.apache.servicemix.jbi.marshaler.DefaultMarshaler
org.apache.servicemix.jbi.messaging.DefaultMarshaler
org.apache.servicemix.components.util.xstream.XStreamMarshaler
- All Implemented Interfaces:
- org.apache.servicemix.jbi.marshaler.PojoMarshaler
public class XStreamMarshaler
- extends DefaultMarshaler
A PojoMarshaler for XStream which
streams the object to an a W3C DOM Document so that other components can access
the XML without an extra parse.
- Version:
- $Revision: 564374 $
| Fields inherited from interface org.apache.servicemix.jbi.marshaler.PojoMarshaler |
BODY |
|
Method Summary |
protected com.thoughtworks.xstream.XStream |
createXStream()
|
org.apache.servicemix.jbi.jaxp.SourceTransformer |
getTransformer()
|
com.thoughtworks.xstream.XStream |
getXStream()
|
boolean |
isUseDOM()
Whether or not DOM should be used for marshalling XML - which is preferable if another component
in the pipeline will want to parse the body. |
void |
marshal(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage message,
Object body)
|
void |
setTransformer(org.apache.servicemix.jbi.jaxp.SourceTransformer transformer)
|
void |
setUseDOM(boolean useDOM)
Enables DOM output when marshalling in case other components in the pipeline wish to perform
parsing. |
void |
setXStream(com.thoughtworks.xstream.XStream xStream)
|
Object |
unmarshal(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage message)
|
| Methods inherited from class org.apache.servicemix.jbi.marshaler.DefaultMarshaler |
asContent, defaultUnmarshal, getParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XStreamMarshaler
public XStreamMarshaler()
marshal
public void marshal(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage message,
Object body)
throws javax.jbi.messaging.MessagingException
- Specified by:
marshal in interface org.apache.servicemix.jbi.marshaler.PojoMarshaler- Overrides:
marshal in class org.apache.servicemix.jbi.marshaler.DefaultMarshaler
- Throws:
javax.jbi.messaging.MessagingException
unmarshal
public Object unmarshal(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage message)
throws javax.jbi.messaging.MessagingException
- Specified by:
unmarshal in interface org.apache.servicemix.jbi.marshaler.PojoMarshaler- Overrides:
unmarshal in class org.apache.servicemix.jbi.marshaler.DefaultMarshaler
- Throws:
javax.jbi.messaging.MessagingException
getXStream
public com.thoughtworks.xstream.XStream getXStream()
setXStream
public void setXStream(com.thoughtworks.xstream.XStream xStream)
getTransformer
public org.apache.servicemix.jbi.jaxp.SourceTransformer getTransformer()
setTransformer
public void setTransformer(org.apache.servicemix.jbi.jaxp.SourceTransformer transformer)
isUseDOM
public boolean isUseDOM()
- Whether or not DOM should be used for marshalling XML - which is preferable if another component
in the pipeline will want to parse the body.
- Returns:
setUseDOM
public void setUseDOM(boolean useDOM)
- Enables DOM output when marshalling in case other components in the pipeline wish to perform
parsing.
- Parameters:
useDOM -
createXStream
protected com.thoughtworks.xstream.XStream createXStream()
Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.