jersey icon indicating copy to clipboard operation
jersey copied to clipboard

Feature Enhancement request for ApacheConnector (jersey-apache-connector)

Open benmingli opened this issue 7 years ago • 0 comments

Hi,

We are user of the jersey-apache-connector project. The endpoint of the project is the ApacheConnector class which does not allow extending/modification. But in our case we need to be able to modify the Apache ClientBuilder with our own SSL settings (cloud settings) and also we need to do more logic rather than simply call ClientBuilder.build().

The ideal working sample for us is to modify the signature of ApacheConnector to be:

public ApacheConnector(final Client client, final Configuration config, final ClientBuilderModifier builderModifier) {

................... ................... ................... //Then at the very end, add the following logic.

    //Support external modifier
    if (null != builderModifier) {
        builderModifier.custom(clientBuilder);
        this.client = builderModifier.build();
    } else {
        this.client = clientBuilder.build();
    }

}

That way we adds flexibility to the ApacheConnector project.

I have implemented the logic and created a pull request https://github.com/jersey/jersey/pull/3777

Please kindly review and let me know if I need to anything. Thanks, Benjamin

benmingli avatar Feb 24 '18 22:02 benmingli