diff options
author | Thomas Wolf <thomas.wolf@paranor.ch> | 2020-11-29 16:22:39 +0100 |
---|---|---|
committer | Thomas Wolf <thomas.wolf@paranor.ch> | 2021-01-14 16:23:44 +0100 |
commit | 224aaa0be755d74deb0b58afe1e1e4c06bdce0b8 (patch) | |
tree | f4f20a5cb6af08f5b6345c1705436563fd5c6416 /org.eclipse.jgit.http.apache/resources | |
parent | 312ab4f7f65e4f7658e307e0fd143642fa95a98a (diff) | |
download | jgit-224aaa0be755d74deb0b58afe1e1e4c06bdce0b8.tar.gz jgit-224aaa0be755d74deb0b58afe1e1e4c06bdce0b8.zip |
TransportHttp: make the connection factory configurable
Previously, TransportHttp always used the globally set connection
factory. This is problematic if that global factory is changed in
the middle of a fetch or push operation. Initialize the factory to
use in the constructor, then use that factory for all HTTP requests
made through this transport. Provide a setter and a getter for it
so that client code can customize the factory, if needed, in a
TransportConfigCallback.
Once a factory has been used on a TransportHttp instance it cannot
be changed anymore.
Make the global static factory reference volatile.
Change-Id: I7c6ee16680407d3724e901c426db174a3125ba1c
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit.http.apache/resources')
0 files changed, 0 insertions, 0 deletions