All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.turbospaces.http.HttpClientDisposableBean Maven / Gradle / Ivy

There is a newer version: 2.0.33
Show newest version
package com.turbospaces.http;

import java.util.Objects;

import javax.inject.Inject;

import org.apache.http.impl.client.CloseableHttpClient;
import org.springframework.beans.factory.DisposableBean;

public class HttpClientDisposableBean implements DisposableBean {
    private final CloseableHttpClient client;

    @Inject
    public HttpClientDisposableBean(CloseableHttpClient channel) {
        this.client = Objects.requireNonNull( channel );
    }
    @Override
    public void destroy() throws Exception {
        client.close();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy