public class Hl7OverHttpRequestDecoder extends AbstractHl7OverHttpDecoder
Modifier and Type | Field and Description |
---|---|
static String |
HTTP_HEADER_HL7_SIGNATURE |
static String |
HTTP_HEADER_HL7_SIGNATURE_LC |
protected static Charset |
ourDefaultCharset |
DEFAULT_READ_TIMEOUT
Constructor and Description |
---|
Hl7OverHttpRequestDecoder() |
Modifier and Type | Method and Description |
---|---|
protected void |
authorize() |
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() |
protected String |
readActionLineAndDecode(InputStream theInputStream) |
void |
setAuthorizationCallback(IAuthorizationServerCallback theAuthorizationCallback) |
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 |
setHeaders(LinkedHashMap<String,String> theHeaders) |
void |
setMessage(String theMessage) |
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 |
decode, getConformanceProblems, getContentType, getEncodingStyle, getResponseName, getResponseStatus, isConnectionCloseHeaderPresent, readContentsFromInputStreamAndDecode, readFirstLine, readHeadersAndContentsFromInputStreamAndDecode, setReadTimeout, setResponseName, setResponseStatus
public static final String HTTP_HEADER_HL7_SIGNATURE
public static final String HTTP_HEADER_HL7_SIGNATURE_LC
protected static final Charset ourDefaultCharset
public Hl7OverHttpRequestDecoder()
protected void authorize() throws AuthorizationFailureException
authorize
in class AbstractHl7OverHttpDecoder
AuthorizationFailureException
protected String readActionLineAndDecode(InputStream theInputStream) throws DecodeException, IOException, NoMessageReceivedException
readActionLineAndDecode
in class AbstractHl7OverHttpDecoder
DecodeException
IOException
NoMessageReceivedException
public void setAuthorizationCallback(IAuthorizationServerCallback theAuthorizationCallback)
theAuthorizationCallback
- the authorizationCallback to setpublic 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 setMessage(String theMessage)
theMessage
- The raw message textpublic void setPassword(String thePassword)
thePassword
- The authorization passwordpublic void setSigner(ISigner theSigner)
ISigner
,
StandardMessageSigner
public 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.