public class DefaultHttpResponseFuture extends Object implements HttpResponseFuture
| Constructor and Description |
|---|
DefaultHttpResponseFuture() |
DefaultHttpResponseFuture(OutboundMsgHolder outboundMsgHolder) |
| Modifier and Type | Method and Description |
|---|---|
DefaultOperationStatus |
getStatus()
Reruns the status of the future.
|
void |
notifyHttpListener(HttpCarbonMessage httpCarbonMessage)
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.
|
public DefaultHttpResponseFuture(OutboundMsgHolder outboundMsgHolder)
public DefaultHttpResponseFuture()
public void setHttpConnectorListener(HttpConnectorListener connectorListener)
HttpResponseFuturesetHttpConnectorListener in interface HttpResponseFutureconnectorListener - the listener that receive http message events related to the connectorpublic void removeHttpListener()
HttpResponseFutureremoveHttpListener in interface HttpResponseFuturepublic void notifyHttpListener(HttpCarbonMessage httpCarbonMessage)
HttpResponseFuturenotifyHttpListener in interface HttpResponseFuturehttpCarbonMessage - the entity which contains the data related to the eventpublic void notifyHttpListener(Throwable throwable)
HttpResponseFuturenotifyHttpListener in interface HttpResponseFuturethrowable - the entity which contains the data related to the errorpublic HttpResponseFuture sync() throws InterruptedException
HttpResponseFuturesync in interface HttpResponseFutureInterruptedException - if the connection is interruptedpublic DefaultOperationStatus getStatus()
HttpResponseFuturegetStatus in interface HttpResponseFutureHttpResponseFuturepublic void resetStatus()
HttpResponseFutureresetStatus in interface HttpResponseFuturepublic void setBackPressureHandler(BackPressureHandler backPressureHandler)
HttpResponseFuturesetBackPressureHandler in interface HttpResponseFuturebackPressureHandler - which handles backpressurepublic void setResponseHandleListener(HttpClientConnectorListener responseHandleListener)
HttpResponseFuturesetResponseHandleListener in interface HttpResponseFutureresponseHandleListener - the listener that receives events related to the handlepublic void removeResponseHandleListener()
HttpResponseFutureremoveResponseHandleListener in interface HttpResponseFuturepublic void notifyResponseHandle(ResponseHandle responseHandle)
HttpResponseFuturenotifyResponseHandle in interface HttpResponseFutureresponseHandle - the entity which contains the data related to the eventpublic void notifyResponseHandle(Throwable throwable)
HttpResponseFuturenotifyResponseHandle in interface HttpResponseFuturethrowable - the error related to the errorpublic void setPromiseAvailabilityListener(HttpClientConnectorListener promiseAvailabilityListener)
HttpResponseFuturesetPromiseAvailabilityListener in interface HttpResponseFuturepromiseAvailabilityListener - the listener that receives events related to the promise availability.public void removePromiseAvailabilityListener()
HttpResponseFutureremovePromiseAvailabilityListener in interface HttpResponseFuturepublic void notifyPromiseAvailability()
HttpResponseFuturenotifyPromiseAvailability in interface HttpResponseFuturepublic void setPushPromiseListener(HttpConnectorListener pushPromiseListener)
HttpResponseFuturesetPushPromiseListener in interface HttpResponseFuturepushPromiseListener - the listener that receives events related to the connectorpublic void removePushPromiseListener()
HttpResponseFutureremovePushPromiseListener in interface HttpResponseFuturepublic void notifyPushPromise()
HttpResponseFuturenotifyPushPromise in interface HttpResponseFuturepublic void setPushResponseListener(HttpConnectorListener pushResponseListener, int promiseId)
HttpResponseFuturesetPushResponseListener in interface HttpResponseFuturepushResponseListener - the push response listenerpromiseId - the promised stream id which the push response is suppose to arrivepublic void removePushResponseListener(int promisedId)
HttpResponseFutureremovePushResponseListener in interface HttpResponseFuturepromisedId - the promised stream id which the push response is suppose to arrivepublic void notifyPushResponse(int streamId,
HttpCarbonMessage pushResponse)
HttpResponseFuturenotifyPushResponse in interface HttpResponseFuturestreamId - stream id of the received push responsepushResponse - push response messagepublic void notifyPushResponse(int streamId,
Throwable throwable)
HttpResponseFuturenotifyPushResponse in interface HttpResponseFuturestreamId - stream id of the received or to be received push responsethrowable - data related to the errorCopyright © 2022 WSO2. All rights reserved.