public interface HttpResponseFuture
| Modifier and Type | Method and Description |
|---|---|
OperationStatus |
getStatus()
Reruns the status of the future.
|
void |
notifyHttpListener(HttpCarbonMessage httpMessage)
Notifies the http message listener when there is an event.
|
void |
notifyHttpListener(Throwable throwable)
Notifies the listener when there is an event.
|
void |
notifyPromiseAvailability()
Notifies the promise listener when there is an event.
|
void |
notifyPushPromise()
Notifies the push promise listener when there is an event.
|
void |
notifyPushResponse(int streamId,
HttpCarbonMessage pushResponse)
Notifies push response listener when there is a push response.
|
void |
notifyPushResponse(int streamId,
Throwable throwable)
Notifies the Push Response Listener when there is an error.
|
void |
notifyResponseHandle(ResponseHandle responseHandle)
Notifies the response handle listener when there is an event.
|
void |
notifyResponseHandle(Throwable throwable)
Notifies the response handle listener when there is an error.
|
void |
removeHttpListener()
Removes the message listener set to the future.
|
void |
removePromiseAvailabilityListener()
Removes the promise availability listener.
|
void |
removePushPromiseListener()
Removes the push promise listener set to the future.
|
void |
removePushResponseListener(int promisedId)
Removes the Push Response listener.
|
void |
removeResponseHandleListener()
Removes the handle listener set to the future.
|
void |
resetStatus()
Reset the states associated with the future.
|
void |
setBackPressureHandler(BackPressureHandler backPressureHandler)
Sets back pressure handler.
|
void |
setHttpConnectorListener(HttpConnectorListener connectorListener)
Sets listener for the connector future.
|
void |
setPromiseAvailabilityListener(HttpClientConnectorListener promiseAvailabilityListener)
Sets the listener for the promise availability future.
|
void |
setPushPromiseListener(HttpConnectorListener pushPromiseListener)
Sets listener for the push promise future.
|
void |
setPushResponseListener(HttpConnectorListener pushResponseListener,
int promiseId)
Sets the Push Response listener.
|
void |
setResponseHandleListener(HttpClientConnectorListener responseHandleListener)
Sets response handle listener.
|
HttpResponseFuture |
sync()
Makes the async operation sync.
|
void setHttpConnectorListener(HttpConnectorListener connectorListener)
connectorListener - the listener that receive http message events related to the connectorvoid removeHttpListener()
void notifyHttpListener(HttpCarbonMessage httpMessage)
httpMessage - the entity which contains the data related to the eventvoid notifyHttpListener(Throwable throwable)
throwable - the entity which contains the data related to the errorOperationStatus getStatus()
HttpResponseFuturevoid resetStatus()
void setBackPressureHandler(BackPressureHandler backPressureHandler)
backPressureHandler - which handles backpressureHttpResponseFuture sync() throws InterruptedException
InterruptedException - if the connection is interruptedvoid setResponseHandleListener(HttpClientConnectorListener responseHandleListener)
responseHandleListener - the listener that receives events related to the handlevoid removeResponseHandleListener()
void notifyResponseHandle(ResponseHandle responseHandle)
responseHandle - the entity which contains the data related to the eventvoid notifyResponseHandle(Throwable throwable)
throwable - the error related to the errorvoid setPromiseAvailabilityListener(HttpClientConnectorListener promiseAvailabilityListener)
promiseAvailabilityListener - the listener that receives events related to the promise availability.void removePromiseAvailabilityListener()
void notifyPromiseAvailability()
void setPushPromiseListener(HttpConnectorListener pushPromiseListener)
pushPromiseListener - the listener that receives events related to the connectorvoid removePushPromiseListener()
void notifyPushPromise()
void setPushResponseListener(HttpConnectorListener pushResponseListener, int promiseId)
pushResponseListener - the push response listenerpromiseId - the promised stream id which the push response is suppose to arrivevoid removePushResponseListener(int promisedId)
promisedId - the promised stream id which the push response is suppose to arrivevoid notifyPushResponse(int streamId,
HttpCarbonMessage pushResponse)
streamId - stream id of the received push responsepushResponse - push response messagevoid notifyPushResponse(int streamId,
Throwable throwable)
streamId - stream id of the received or to be received push responsethrowable - data related to the errorCopyright © 2022 WSO2. All rights reserved.