Interface MetaData.Failed
-
Method Summary
Modifier and TypeMethodDescriptionstatic Throwable
getFailure
(MetaData metaData) Inspects the givenMetaData
, and if it is an instance of this interface return its failure, otherwise returnsnull
.static MetaData
newFailedMetaData
(HttpVersion httpVersion, Throwable failure) static MetaData.Request
newFailedMetaDataRequest
(HttpVersion httpVersion, Throwable failure) Creates a new failedMetaData.Request
, with methodGET
, emptyHttpURI
and emptyHttpFields
, with the givenHttpVersion
and failure.static MetaData.Response
newFailedMetaDataResponse
(HttpVersion httpVersion, Throwable failure) Creates a new failedMetaData.Response
, with status0
, no reason, emptyHttpFields
, with the givenHttpVersion
and failure.
-
Method Details
-
getFailure
Inspects the given
MetaData
, and if it is an instance of this interface return its failure, otherwise returnsnull
. -
newFailedMetaDataRequest
Creates a new failed
MetaData.Request
, with methodGET
, emptyHttpURI
and emptyHttpFields
, with the givenHttpVersion
and failure.- Parameters:
httpVersion
- the HTTP versionfailure
- the failure cause- Returns:
- a new failed
MetaData.Request
-
newFailedMetaDataResponse
Creates a new failed
MetaData.Response
, with status0
, no reason, emptyHttpFields
, with the givenHttpVersion
and failure.- Parameters:
httpVersion
- the HTTP versionfailure
- the failure cause- Returns:
- a new failed
MetaData.Response
-
newFailedMetaData
Creates a new failed
MetaData
, with emptyHttpFields
, with the givenHttpVersion
and failure.- Parameters:
httpVersion
- the HTTP versionfailure
- the failure cause- Returns:
- a new failed
MetaData
-
getFailure
Throwable getFailure()- Returns:
- the failure cause
-