@Contract(threading=IMMUTABLE_CONDITIONAL) public class DefaultClassicHttpResponseFactory extends Object implements HttpResponseFactory<ClassicHttpResponse>
ClassicHttpResponse objects.| Modifier and Type | Field and Description |
|---|---|
static DefaultClassicHttpResponseFactory |
INSTANCE |
| Constructor and Description |
|---|
DefaultClassicHttpResponseFactory()
Creates a new response factory with the default catalog.
|
DefaultClassicHttpResponseFactory(ReasonPhraseCatalog catalog)
Creates a new response factory with the given catalog.
|
| Modifier and Type | Method and Description |
|---|---|
ClassicHttpResponse |
newHttpResponse(int status)
Creates a new response with the given code.
|
ClassicHttpResponse |
newHttpResponse(int status,
String reasonPhrase)
Creates response message with the given code and reason phrase.
|
public static final DefaultClassicHttpResponseFactory INSTANCE
public DefaultClassicHttpResponseFactory(ReasonPhraseCatalog catalog)
catalog - the catalog of reason phrasespublic DefaultClassicHttpResponseFactory()
EnglishReasonPhraseCatalog.public ClassicHttpResponse newHttpResponse(int status, String reasonPhrase)
HttpResponseFactorynewHttpResponse in interface HttpResponseFactory<ClassicHttpResponse>status - the status codereasonPhrase - the reason phrasepublic ClassicHttpResponse newHttpResponse(int status)
HttpResponseFactorynewHttpResponse in interface HttpResponseFactory<ClassicHttpResponse>status - the status codeCopyright © 2005–2022 The Apache Software Foundation. All rights reserved.