Class HttpComponentHttpRequestTaskAbortStrategy

  • All Implemented Interfaces:
    TaskAbortStrategy

    public class HttpComponentHttpRequestTaskAbortStrategy
    extends Object
    implements TaskAbortStrategy
    Strategy to abort and Http Components HTTP request.

    These requests are used by (for instance) Spring's RestTemplate.

    Since:
    2.0.0
    Author:
    Rutger Lubbers, Paul Klos
    • Constructor Detail

      • HttpComponentHttpRequestTaskAbortStrategy

        public HttpComponentHttpRequestTaskAbortStrategy​(@NotNull
                                                         @NotNull org.apache.http.client.methods.HttpUriRequest request)
        Construct a new instance with the request we may have to abort.
        Parameters:
        request - The request about to be executed (which we have to guard).
    • Method Detail

      • invoke

        public boolean invoke()
        Invoke the strategy in order to abort the task (that registered this abort strategy).
        Specified by:
        invoke in interface TaskAbortStrategy