public class Hl7OverHttpResponseDecoder 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 |
---|
Hl7OverHttpResponseDecoder() |
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() |
boolean |
isConnectionCloseHeaderPresent()
Returns true if the connection=close header was present in the response
|
protected String |
readActionLineAndDecode(InputStream theInputStream) |
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, 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 Hl7OverHttpResponseDecoder()
protected String readActionLineAndDecode(InputStream theInputStream) throws IOException, NoMessageReceivedException, DecodeException
readActionLineAndDecode
in class AbstractHl7OverHttpDecoder
IOException
NoMessageReceivedException
DecodeException
protected void authorize() throws AuthorizationFailureException
authorize
in class AbstractHl7OverHttpDecoder
AuthorizationFailureException
public boolean isConnectionCloseHeaderPresent()
isConnectionCloseHeaderPresent
in class AbstractHl7OverHttpDecoder
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 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.