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:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final SocketFactory
    The default socket factory
  • Method Summary

    Modifier and Type
    Method
    Description
    Create an unconnected tcp socket for establishing a client.
  • Field Details

    • DEFAULT

      @Immutable static final SocketFactory DEFAULT
      The default socket factory
  • Method Details

    • createSocket

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