public class ResponseErrorHandler extends HttpResponseErrorHandler
StatusMessages for TAXII 1.0 when
an error occurs while handling the response from the TAXII server.| Constructor and Description |
|---|
ResponseErrorHandler() |
| Modifier and Type | Method and Description |
|---|---|
StatusMessage |
buildSSLErrorStatusMessage(javax.net.ssl.SSLException ex,
java.lang.Object message)
Construct an "UNAUTHORIZED" StatusMessage.
|
StatusMessage |
buildStatusCodeStatusMessage(org.apache.http.client.methods.CloseableHttpResponse response,
java.lang.Object msgIn)
Build a status message based to the HTTP response code.
|
buildResponseStrpublic StatusMessage buildStatusCodeStatusMessage(org.apache.http.client.methods.CloseableHttpResponse response, java.lang.Object msgIn)
buildStatusCodeStatusMessage in class HttpResponseErrorHandlerresponse - the HTTP response object.public StatusMessage 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.
buildSSLErrorStatusMessage in class HttpResponseErrorHandlerex - message -