@Dataformat(value="hl7")
public class HL7DataFormat
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.spi.DataFormat, org.apache.camel.spi.DataFormatName
HL7MLLPCodec
Constructor and Description |
---|
HL7DataFormat() |
Modifier and Type | Method and Description |
---|---|
protected void |
doStart() |
protected void |
doStop() |
String |
getDataFormatName() |
ca.uhn.hl7v2.HapiContext |
getHapiContext() |
ca.uhn.hl7v2.parser.Parser |
getParser() |
protected String |
guessCharsetName(byte[] b,
org.apache.camel.Exchange exchange)
In HL7 the charset of the message can be set in MSH-18, but you need to decode the input stream in order to be
able to read MSH-18.
|
boolean |
isValidate() |
void |
marshal(org.apache.camel.Exchange exchange,
Object body,
OutputStream outputStream) |
void |
setHapiContext(ca.uhn.hl7v2.HapiContext context) |
void |
setParser(ca.uhn.hl7v2.parser.Parser parser) |
void |
setValidate(boolean validate) |
Object |
unmarshal(org.apache.camel.Exchange exchange,
InputStream inputStream) |
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public String getDataFormatName()
getDataFormatName
in interface org.apache.camel.spi.DataFormatName
public void marshal(org.apache.camel.Exchange exchange, Object body, OutputStream outputStream) throws Exception
marshal
in interface org.apache.camel.spi.DataFormat
Exception
public Object unmarshal(org.apache.camel.Exchange exchange, InputStream inputStream) throws Exception
unmarshal
in interface org.apache.camel.spi.DataFormat
Exception
public boolean isValidate()
public void setValidate(boolean validate)
public ca.uhn.hl7v2.HapiContext getHapiContext()
public void setHapiContext(ca.uhn.hl7v2.HapiContext context)
public ca.uhn.hl7v2.parser.Parser getParser()
public void setParser(ca.uhn.hl7v2.parser.Parser parser)
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.service.BaseService
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.service.BaseService
Exception
protected String guessCharsetName(byte[] b, org.apache.camel.Exchange exchange)
ExchangeHelper.getCharsetName(Exchange)
.b
- byte arrayexchange
- the exchangeApache Camel