jbosh/BOSHClient.java at master · igniterealtime/jbosh · GitHub
The line 235 … private final HTTPSender httpSender = ServiceLib.loadService(HTTPSender.class); … which is indirectly refers a “.properties” file
My Suggestion is
Similar to our smack packet extension providers, this should be a developer/user customisable … so that either Apache HttpClient 4.x or UrlConnection or any other can be chosen appropriately
jBOSH uses SPI, so it’s configurable. After all, that’s the main task of the Service Provider Interface (SPI). See also Introduction to the Service Provider Interfaces (The Java™ Tutorials > Sound)
That means … to change the HttpSender, I need to open the JAR file and modify “org.igniterealtime.jbosh.HTTPSender” file which is currently contains “org.igniterealtime.jbosh.ApacheHTTPSender” and modify it and make my own JAR file?
jbosh/org.igniterealtime.jbosh.HTTPSender at master · igniterealtime/jbosh · GitHub
You don’t need to modify the Jar in order to provide the resource that configures the implementation of the service interface. You could simply set the related system property.
I think you are talking about “loadServicesImplementations” function implementation inside jbosh/ServiceLib.java at master · igniterealtime/jbosh · GitHub