Interface MetaData.Failed
- Enclosing class:
MetaData
public static interface MetaData.Failed
Marker interface to signal that a MetaData could not be created,
for example due to an invalid URI or invalid headers.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ThrowablegetFailure(MetaData metaData) Inspects the givenMetaData, and if it is an instance of this interface return its failure, otherwise returnsnull.static MetaDatanewFailedMetaData(HttpVersion httpVersion, Throwable failure) static MetaData.RequestnewFailedMetaDataRequest(HttpVersion httpVersion, Throwable failure) Creates a new failedMetaData.Request, with methodGET, emptyHttpURIand emptyHttpFields, with the givenHttpVersionand failure.static MetaData.ResponsenewFailedMetaDataResponse(HttpVersion httpVersion, Throwable failure) Creates a new failedMetaData.Response, with status0, no reason, emptyHttpFields, with the givenHttpVersionand 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, emptyHttpURIand emptyHttpFields, with the givenHttpVersionand 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 givenHttpVersionand 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 givenHttpVersionand failure.- Parameters:
httpVersion- the HTTP versionfailure- the failure cause- Returns:
- a new failed
MetaData
-
getFailure
Throwable getFailure()- Returns:
- the failure cause
-