Interface SocketFactory

  • All Known Implementing Classes:
    SniProxySocketFactory
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface SocketFactory
    A socket factory used to create sockets from a client to locators or servers. Sockets returned by this factory will have the rest of the configuration options specified on the Pool and on the ClientCache applied to them. In particular, sockets returned by this factory will be wrapped with SSLSockets if ssl is enabled for this client cache based on ConfigurationProperties.SSL_ENABLED_COMPONENTS. Sockets return by this factory should not be SSLSockets. For modifying SSL settings, see SSLParameterExtension Sockets returned by this factory should be in an unconnected state, similar to Socket() This factory can be used for configuring a proxy, or overriding various socket settings.
    See Also:
    PoolFactory.setSocketFactory(SocketFactory)
    • Method Detail

      • createSocket

        java.net.Socket createSocket()
                              throws java.io.IOException
        Create an unconnected tcp socket for establishing a client.
        Returns:
        an unconnected socket
        Throws:
        java.io.IOException - if the socket cannot be created