What is Scheme Registry?
Protocol scheme registry maintains a map of connection socket factories per distinct protocol scheme. For instance, HTTPS scheme requires that connections be secured with TLS/SSL. One may also want to customize the way sockets for HTTP and HTTPS schemes are created and initialized by registering a custom socket factory for those schemes.
What impact does it make if i use scheme registry like below
You end up with a custom protocol scheme (say, MYHTTP
).
Whenever you execute a request using this scheme (say, myhttp://somehost/someservice/
) your custom socket factory will be used to create and initialize outgoing connections to the target server.