public interface ISSLSocketFactoryListener
SSLSocketFactory
objects. Implementors usually take care of initializing an SSLContext
on their own.
This listener is given an array of trust and key managers along with the send event and, indirectly through the event, the name of the manager. The latter can be used to return precached versions
of the socket factory. This way an SSLContext
doesn't have to be initialized at every invocation. A given HttpConversationManager
will always invoke the
onFactoryNeeded
method with the same set of trust and key managers as they are no longer modifiable once the manager is in
use (technically, this means that the arrays will contain essentially the same managers but the underlying objects might be different between invocations, including the arrays themselves). If the
application developer properly names the managers it uses then using the provided manager name an implementation becomes able to initialize the factory once for each manager and return the cached
instance, if needed.
Modifier and Type | Method and Description |
---|---|
javax.net.ssl.SSLSocketFactory |
onFactoryNeeded(ISendEvent event,
javax.net.ssl.X509TrustManager[] trustManagers,
javax.net.ssl.X509KeyManager[] keyManagers)
Returns the SSL socket factory to be used during HTTPS communication initiated by a
HttpConversationManager . |
javax.net.ssl.SSLSocketFactory onFactoryNeeded(ISendEvent event, javax.net.ssl.X509TrustManager[] trustManagers, javax.net.ssl.X509KeyManager[] keyManagers)
HttpConversationManager
.event
- the send event, must be non-nulltrustManagers
- the array of trust managers, can be nullkeyManagers
- the array of key managers, can be null