Package org.hawaiiframework.async.http
Class HttpComponentHttpRequestTaskAbortStrategy
java.lang.Object
org.hawaiiframework.async.http.HttpComponentHttpRequestTaskAbortStrategy
- All Implemented Interfaces:
TaskAbortStrategy
Strategy to abort and Http Components HTTP request.
These requests are used by (for instance) Spring's RestTemplate.
- Since:
- 2.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionHttpComponentHttpRequestTaskAbortStrategy(org.apache.hc.client5.http.classic.methods.HttpUriRequest request) Construct a new instance with therequestwe may have to abort. -
Method Summary
Modifier and TypeMethodDescriptionbooleaninvoke()Invoke the strategy in order to abort the task (that registered this abort strategy).
-
Constructor Details
-
HttpComponentHttpRequestTaskAbortStrategy
public HttpComponentHttpRequestTaskAbortStrategy(@NonNull org.apache.hc.client5.http.classic.methods.HttpUriRequest request) Construct a new instance with therequestwe may have to abort.- Parameters:
request- The request about to be executed (which we have to guard).
-
-
Method Details
-
invoke
public boolean invoke()Description copied from interface:TaskAbortStrategyInvoke the strategy in order to abort the task (that registered this abort strategy).- Specified by:
invokein interfaceTaskAbortStrategy- Returns:
trueif the task has been aborted.
-