@Contract(threading=IMMUTABLE_CONDITIONAL) public class DefaultHttpResponseFactory extends Object implements HttpResponseFactory
HttpResponse objects.| Modifier and Type | Field and Description |
|---|---|
static DefaultHttpResponseFactory |
INSTANCE |
| Constructor and Description |
|---|
DefaultHttpResponseFactory()
Creates a new response factory with the default catalog.
|
DefaultHttpResponseFactory(ReasonPhraseCatalog catalog)
Creates a new response factory with the given catalog.
|
| Modifier and Type | Method and Description |
|---|---|
HttpResponse |
newHttpResponse(ProtocolVersion ver,
int status,
HttpContext context)
Creates a new response from status line elements.
|
HttpResponse |
newHttpResponse(StatusLine statusline,
HttpContext context)
Creates a new response from a status line.
|
public static final DefaultHttpResponseFactory INSTANCE
public DefaultHttpResponseFactory(ReasonPhraseCatalog catalog)
catalog - the catalog of reason phrasespublic DefaultHttpResponseFactory()
EnglishReasonPhraseCatalog.public HttpResponse newHttpResponse(ProtocolVersion ver, int status, HttpContext context)
HttpResponseFactorynewHttpResponse in interface HttpResponseFactoryver - the protocol versionstatus - the status codecontext - the context from which to determine the locale
for looking up a reason phrase to the status code, or
null to use the default localepublic HttpResponse newHttpResponse(StatusLine statusline, HttpContext context)
HttpResponseFactorynewHttpResponse in interface HttpResponseFactorystatusline - the status linecontext - the context from which to determine the locale
for looking up a reason phrase if the status code
is updated, or
null to use the default localeCopyright © 2010 - 2020 Adobe. All Rights Reserved