public class SmooksDataFormat extends Object implements org.apache.camel.spi.DataFormat, org.apache.camel.CamelContextAware, org.apache.camel.Service
SmooksComponent or SmooksProcessor as they hook
into Camels lifecycle manegment and will close resources correctly.| Constructor and Description |
|---|
SmooksDataFormat(String smooksConfig) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.camel.CamelContext |
getCamelContext() |
protected Object |
getResult(Exports exports,
Result[] results,
org.apache.camel.Exchange exchange) |
void |
marshal(org.apache.camel.Exchange exchange,
Object fromBody,
OutputStream toStream)
Marshals the Object 'fromBody' to an OutputStream 'toStream'
The Camel framework will call this method from
MarshalProcessor.process(Exchange)
and it will take care of setting the Out Message's body to the bytes written to the toStream
OutputStream. |
void |
setCamelContext(org.apache.camel.CamelContext camelContext) |
void |
start() |
void |
stop() |
Object |
unmarshal(org.apache.camel.Exchange exchange,
InputStream fromStream) |
public void marshal(org.apache.camel.Exchange exchange,
Object fromBody,
OutputStream toStream)
throws Exception
MarshalProcessor.process(Exchange)
and it will take care of setting the Out Message's body to the bytes written to the toStream
OutputStream.marshal in interface org.apache.camel.spi.DataFormatexchange - The Camel Exchange.fromBody - The object to be marshalled into the output stream.toStream - The output stream that will be written to.Exceptionpublic Object unmarshal(org.apache.camel.Exchange exchange, InputStream fromStream) throws Exception
unmarshal in interface org.apache.camel.spi.DataFormatExceptionprotected Object getResult(Exports exports, Result[] results, org.apache.camel.Exchange exchange)
public void setCamelContext(org.apache.camel.CamelContext camelContext)
setCamelContext in interface org.apache.camel.CamelContextAwarepublic org.apache.camel.CamelContext getCamelContext()
getCamelContext in interface org.apache.camel.CamelContextAwarepublic void start()
throws Exception
start in interface org.apache.camel.ServiceExceptionCopyright © 2015. All rights reserved.