Top Description Methods
org.apache.http

public Interface HttpResponseFactory

Known Direct Implementers
org.apache.http.impl.DefaultHttpResponseFactory
Imports
org.apache.http.protocol.HttpContext

A factory for HttpResponse objects.
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public HttpResponse

Returns:

the new response with an initialized status line
newHttpResponse
(ProtocolVersion
the protocol version
ver
,
int
the status code
status
,
HttpContext
the context from which to determine the locale for looking up a reason phrase to the status code, or null to use the default locale
context
)

Creates a new response from status line elements.

public HttpResponse

Returns:

the new response with the argument status line
newHttpResponse
(StatusLine
the status line
statusline
,
HttpContext
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 locale
context
)

Creates a new response from a status line.

Method Detail

newHttpResponseback to summary
public HttpResponse newHttpResponse(ProtocolVersion ver, int status, HttpContext context)

Creates a new response from status line elements.

Parameters
ver:ProtocolVersion

the protocol version

status:int

the status code

context:HttpContext

the context from which to determine the locale for looking up a reason phrase to the status code, or null to use the default locale

Returns:HttpResponse

the new response with an initialized status line

newHttpResponseback to summary
public HttpResponse newHttpResponse(StatusLine statusline, HttpContext context)

Creates a new response from a status line.

Parameters
statusline:StatusLine

the status line

context:HttpContext

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 locale

Returns:HttpResponse

the new response with the argument status line