Interface OutgoingHttpRequestActivity
-
- All Superinterfaces:
HttpActivity
public interface OutgoingHttpRequestActivity extends HttpActivity
An outgoing request activity, created when an application sends an HTTP request. The application must attach to the activity in order to receive the response. The activity ends when the response arrives.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
endActivity()
Explicitly end the activity.boolean
endOnResponse()
Is the activity set to end when a response is received?HttpResponse
getResponse()
Get the response received on this activity.void
sendRequest()
Send the request associated with this activity.-
Methods inherited from interface com.opencloud.slee.resources.http.HttpActivity
getRequest
-
-
-
-
Method Detail
-
sendRequest
void sendRequest() throws IOException
Send the request associated with this activity. Call this method to send the request if the activity was created usingHttpProvider.createRequestActivity(HttpRequest)
orHttpProvider.createRequestActivity(HttpRequest, boolean)
- Throws:
IOException
-
getResponse
HttpResponse getResponse()
Get the response received on this activity.- Returns:
- the response, or
null
if a response has not been received yet.
-
endOnResponse
boolean endOnResponse()
Is the activity set to end when a response is received?- Returns:
true
if the activity will automatically end when a response is received.
-
endActivity
void endActivity()
Explicitly end the activity. This is only permitted ifendOnResponse()
isfalse
. The application must call this to end the activity if it has requested the activity to remain alive after the response is received, usingHttpProvider.sendRequest(com.opencloud.slee.resources.http.HttpRequest, boolean)
.- Throws:
IllegalStateException
- if no response has been received, or if the activity is set to end automatically anyway.
-
-