public class DefaultHTTPGetRequest extends java.lang.Object implements HTTPRequest
| Constructor and Description |
|---|
DefaultHTTPGetRequest(java.lang.String request,
boolean secure,
XAddressInfo targetXAddressInfo) |
| Modifier and Type | Method and Description |
|---|---|
long |
calculateSize(ConnectionInfo connectionInfo) |
AttributedURI |
getOptionalMessageId() |
HTTPRequestHeader |
getRequestHeader(ConnectionInfo connectionInfo)
Returns the HTTP header for this HTTP request.
|
HTTPResponseHandler |
getResponseHandler(ContentType contentType)
This method allows the handling of this request's incoming response.
|
XAddressInfo |
getTargetXAddressInfo() |
void |
messageWithoutBodyReceived(int code,
ConnectionInfo connectionInfo,
MonitoringContext context) |
boolean |
needsBody() |
void |
requestSendFailed(java.lang.Exception e,
ConnectionInfo connectionInfo,
MonitoringContext context)
This method will be invoked if an exception occurs whilst sending the HTTP request.
|
void |
responseReceiveFailed(java.lang.Exception e,
ConnectionInfo connectionInfo,
MonitoringContext context)
This method will be invoked if an exception occurs whilst receiving the HTTP response.
|
void |
serializeRequestBody(java.io.OutputStream out,
ConnectionInfo connectionInfo,
MonitoringContext context)
Serializes the HTTP body to the given stream.
|
public DefaultHTTPGetRequest(java.lang.String request,
boolean secure,
XAddressInfo targetXAddressInfo)
public long calculateSize(ConnectionInfo connectionInfo)
calculateSize in interface HTTPRequestpublic void serializeRequestBody(java.io.OutputStream out,
ConnectionInfo connectionInfo,
MonitoringContext context)
throws java.io.IOException
HTTPRequestserializeRequestBody in interface HTTPRequestout - the stream to serialize the body.connectionInfo - addressing information associated to the requestjava.io.IOExceptionpublic HTTPRequestHeader getRequestHeader(ConnectionInfo connectionInfo)
HTTPRequestgetRequestHeader in interface HTTPRequestpublic void requestSendFailed(java.lang.Exception e,
ConnectionInfo connectionInfo,
MonitoringContext context)
HTTPRequest
This method allows to check for exceptions during the HTTP request.
requestSendFailed in interface HTTPRequeste - the exception.public void responseReceiveFailed(java.lang.Exception e,
ConnectionInfo connectionInfo,
MonitoringContext context)
HTTPRequest
This method allows to check for exceptions during the HTTP response.
responseReceiveFailed in interface HTTPRequeste - the exception.public HTTPResponseHandler getResponseHandler(ContentType contentType) throws java.io.IOException
HTTPRequest
The HTTPClient will call this method for a incoming response. If no HTTPResponseHandler belongs to this request, the HTTP client will check the internal handler
list.
getResponseHandler in interface HTTPRequestcontentType - The Internet media type of the response.HTTPResponseHandler which should handle the response.java.io.IOExceptionpublic AttributedURI getOptionalMessageId()
getOptionalMessageId in interface HTTPRequestpublic XAddressInfo getTargetXAddressInfo()
getTargetXAddressInfo in interface HTTPRequestpublic void messageWithoutBodyReceived(int code,
ConnectionInfo connectionInfo,
MonitoringContext context)
messageWithoutBodyReceived in interface HTTPRequestpublic boolean needsBody()
needsBody in interface HTTPRequest