|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.noelios.restlet.http.HttpCall
public class HttpCall
Low-level call for the HTTP connectors.
Constructor Summary | |
---|---|
HttpCall()
Constructor. |
Method Summary | |
---|---|
String |
formatDate(Date date,
boolean cookie)
Formats a date as a header string. |
String |
getClientAddress()
Returns the client address. Corresponds to the IP address of the requesting client. |
int |
getClientPort()
Returns the client port. Corresponds to the TCP/IP port of the requesting client. |
ConnectorService |
getConnectorService(Request request)
Returns the connector service associated to a request. |
String |
getHostDomain()
Returns the host domain. |
int |
getHostPort()
Returns the host port. |
Logger |
getLogger()
Returns the logger to use. |
String |
getMethod()
Returns the request method. |
Protocol |
getProtocol()
Returns the exact protocol (HTTP or HTTPS). |
String |
getReasonPhrase()
Returns the reason phrase. |
Series<Parameter> |
getRequestHeaders()
Returns the modifiable list of request headers. |
String |
getRequestUri()
Returns the URI on the request line (most like a relative reference, but not necessarily). |
Series<Parameter> |
getResponseHeaders()
Returns the modifiable list of server headers. |
String |
getServerAddress()
Returns the response address. Corresponds to the IP address of the responding server. |
int |
getServerPort()
Returns the server port. |
int |
getStatusCode()
Returns the status code. |
String |
getVersion()
Returns the protocol version used. |
boolean |
isConfidential()
Indicates if the confidentiality of the call is ensured (ex: via SSL). |
Date |
parseDate(String date,
boolean cookie)
Parses a date string. |
protected void |
setClientAddress(String clientAddress)
Sets the client address. |
protected void |
setClientPort(int clientPort)
Sets the client port. |
protected void |
setConfidential(boolean confidential)
Indicates if the confidentiality of the call is ensured (ex: via SSL). |
void |
setHostDomain(String hostDomain)
Sets the host domain name. |
void |
setHostPort(int hostPort)
Sets the host port. |
void |
setLogger(Logger logger)
Sets the logger to use. |
protected void |
setMethod(String method)
Sets the request method. |
void |
setProtocol(Protocol protocol)
Sets the exact protocol used (HTTP or HTTPS). |
void |
setReasonPhrase(String reasonPhrase)
Sets the reason phrase. |
protected void |
setRequestUri(String requestUri)
Sets the full request URI. |
void |
setServerAddress(String responseAddress)
Sets the response address. Corresponds to the IP address of the responding server. |
void |
setServerPort(int serverPort)
Sets the server port. |
void |
setStatusCode(int code)
Sets the status code. |
void |
setVersion(String version)
Sets the protocol version used. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpCall()
Method Detail |
---|
public String formatDate(Date date, boolean cookie)
date
- The date to format.cookie
- Indicates if the date should be in the cookie format.
public String getClientAddress()
public int getClientPort()
public ConnectorService getConnectorService(Request request)
request
- The request to lookup.
public String getHostDomain()
public int getHostPort()
public Logger getLogger()
public String getMethod()
public Protocol getProtocol()
public String getReasonPhrase()
public Series<Parameter> getRequestHeaders()
public String getRequestUri()
public Series<Parameter> getResponseHeaders()
public String getServerAddress()
public int getServerPort()
public int getStatusCode() throws IOException
IOException
public String getVersion()
public boolean isConfidential()
public Date parseDate(String date, boolean cookie)
date
- The date string to parse.cookie
- Indicates if the date is in the cookie format.
protected void setClientAddress(String clientAddress)
clientAddress
- The client address.protected void setClientPort(int clientPort)
clientPort
- The client port.protected void setConfidential(boolean confidential)
confidential
- True if the confidentiality of the call is ensured (ex: via
SSL).public void setHostDomain(String hostDomain)
hostDomain
- The baseRef domain name.public void setHostPort(int hostPort)
hostPort
- The host port.public void setLogger(Logger logger)
logger
- The logger to use.protected void setMethod(String method)
method
- The request method.public void setProtocol(Protocol protocol)
protocol
- The protocol.public void setReasonPhrase(String reasonPhrase)
reasonPhrase
- The reason phrase.protected void setRequestUri(String requestUri)
requestUri
- The full request URI.public void setServerAddress(String responseAddress)
responseAddress
- The response address.public void setServerPort(int serverPort)
serverPort
- The server port.public void setStatusCode(int code)
code
- The status code.public void setVersion(String version)
version
- The protocol version used.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |