public abstract class AbstractHl7OverHttpEncoder extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
HTTP_HEADER_HL7_SIGNATURE |
static String |
HTTP_HEADER_HL7_SIGNATURE_LC |
protected static Charset |
ourDefaultCharset |
| Constructor and Description |
|---|
AbstractHl7OverHttpEncoder()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addSpecificHeaders() |
void |
encode() |
void |
encodeToOutputStream(OutputStream theOutputStream) |
String |
getActionLine() |
Charset |
getCharset()
Returns the charset associated with this message.
|
byte[] |
getData() |
static Charset |
getDefaultCharset() |
Map<String,String> |
getHeaders() |
String |
getMessage() |
String |
getPassword() |
String |
getPath() |
String |
getPathRaw() |
ISigner |
getSigner() |
String |
getUsername() |
boolean |
isCharsetExplicitlySet() |
void |
setActionLine(String theActionLine) |
protected abstract void |
setActionLineAppropriately() |
void |
setCharset(Charset theCharset)
Deprecated.
The HL7 over HTTP specification now mandates the use of UTF-8. Using this method to set a value other than UTF-8 will lead to a non-conformant application
|
protected void |
setData(byte[] theData) |
void |
setDataProvider(ISendable<?> theSendable)
Provide the message to send with a
ISendable instance. |
void |
setHeaders(LinkedHashMap<String,String> theHeaders) |
void |
setMessage(String theData)
Provide the message to send with a String.
|
void |
setPassword(String thePassword) |
void |
setPath(String thePath) |
void |
setSigner(ISigner theSigner)
Optionally may be used to provide a signer implementation which signs HL7
content.
|
void |
setUsername(String theUsername) |
protected void |
verifyNotUsed()
Throws an
IllegalStateException if called more than once |
public static final String HTTP_HEADER_HL7_SIGNATURE
public static final String HTTP_HEADER_HL7_SIGNATURE_LC
protected static final Charset ourDefaultCharset
public AbstractHl7OverHttpEncoder()
public void encode() throws EncodeException
EncodeExceptionpublic void encodeToOutputStream(OutputStream theOutputStream) throws IOException, EncodeException
IOExceptionEncodeExceptionpublic String getActionLine()
public void setActionLine(String theActionLine)
theActionLine - the actionLine to setpublic void setDataProvider(ISendable<?> theSendable)
ISendable instance. Either
this method OR setMessage(String) must be called, but not both.public void setMessage(String theData)
setDataProvider(ISendable) must be called, but not both.theData - The raw message textprotected abstract void addSpecificHeaders()
protected abstract void setActionLineAppropriately()
public Charset getCharset()
null.public byte[] getData()
public Map<String,String> getHeaders()
public String getMessage()
public String getPassword()
public String getPathRaw()
public String getUsername()
public boolean isCharsetExplicitlySet()
true if the charset was explicitly set using
setCharset(Charset)@Deprecated public void setCharset(Charset theCharset)
theCharset - The encoding charset to use (default is UTF-8)protected void setData(byte[] theData)
theData - the data to setpublic void setHeaders(LinkedHashMap<String,String> theHeaders)
theHeaders - the headers to setpublic void setPassword(String thePassword)
thePassword - The authorization passwordpublic void setSigner(ISigner theSigner)
ISigner,
StandardMessageSignerpublic void setUsername(String theUsername)
theUsername - The authorization usernameprotected void verifyNotUsed()
IllegalStateException if called more than oncepublic static Charset getDefaultCharset()
Copyright © 2012–2017 University Health Network. All rights reserved.