public abstract class HttpResponseErrorHandler
extends java.lang.Object
Constructor and Description |
---|
HttpResponseErrorHandler() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
buildResponseStr(org.apache.http.client.methods.CloseableHttpResponse response)
Render the headers and the response content as a string.
|
abstract java.lang.Object |
buildSSLErrorStatusMessage(javax.net.ssl.SSLException ex,
java.lang.Object message)
Construct an "UNAUTHORIZED" StatusMessage.
|
abstract java.lang.Object |
buildStatusCodeStatusMessage(org.apache.http.client.methods.CloseableHttpResponse response,
java.lang.Object message)
We received a response that was not a 200 (Success)
value.
|
public abstract java.lang.Object buildStatusCodeStatusMessage(org.apache.http.client.methods.CloseableHttpResponse response, java.lang.Object message)
response
- the HTTP response object.msgIn
- the TAXII message received from the server.public abstract java.lang.Object buildSSLErrorStatusMessage(javax.net.ssl.SSLException ex, java.lang.Object message)
Section 5.2 of the TAXII HTTP Protocol Binding Specification states:
"If TLS is used, problems with the TLS handshake or connection are indicated using a TLS Alert Protocol Record. This section defines rules for interpreting a TLS Alert Protocol Record as a TAXII Status Message. Treat a TLS Alert Protocol Record as being equivalent to a TAXII Status Message with the following properties:
Unfortunately, Java does not give us access to the TLS Alert, so we'll just make all the Statuses UNAUTHORIZED and return the exception's message.
ex
- message
- public java.lang.String buildResponseStr(org.apache.http.client.methods.CloseableHttpResponse response)
response
-