com.verisign.epp.transport.client

## Class EPPPlainProxyClientSocket

- java.lang.Object
- - com.verisign.epp.transport.client.EPPPlainClientSocket
  - - com.verisign.epp.transport.client.EPPPlainProxyClientSocket

- All Implemented Interfaces:
    EPPClientCon

      public class EPPPlainProxyClientSocket
      extends EPPPlainClientSocket

  EPP plain client socket connection that goes through the Apache server mod_proxy. The interface is exactly the same as EPPPlainClientSocket, except one additional configuration properties that defines the `EPPProxyServersLocator` class that's used to get the list of proxy servers to connect through. The `EPPProxyServersLocator` configuration property defines the location class. Additional configuration properties might be required including:
  - `EPP.ProxyServers` - Defines the list of proxy servers when `EPPProxyServersLocator` is set to `com.verisign.epp.transport.client.EPPConfigProxyServersLocator`.
  - `EPP.ProxyServersRandomize` is set to `true` to enable randomization of the proxy servers to attempt to connect through and `false` otherwise. The default setting is `true` if `EPP.ProxyServersRandomize` is not set.
  The `EPPProxyServersLocator` is a static attribute for getting the list of proxy servers connect through. By default in the constructor the `EPPProxyServersLocator` is set based on the `EPPProxyServersLocator` configuration property. If additional initialization is required for the `EPPProxyServersLocator` used, then the `setLocator(EPPProxyServersLocator)` should be called prior to instantiating an instance of `EPPPlainProxyClientSocket` indirectly via the `EPPSession`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EPPPlainProxyClientSocket()` Constructor for initializing a new client socket connection that goes throw one of a list of proxy servers defined by the EPP.ProxyServers configuration property.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static EPPProxyServersLocator` | `getLocator()` Gets the current `EPPProxyServersLocator` used by `EPPPlainProxyClientSocket`.
    `void` | `initialize()` Override of the `EPPSSLClientSocket.initialize()` that will first connect to the Apache proxy server, send the target server connection information to the proxy server, and then initialize the SSL connection through the proxy server.
    `static void` | `setLocator(EPPProxyServersLocator aLocator)` Sets the `EPPProxyServersLocator` to use when getting the list of proxy servers to connect through.

    - ### Methods inherited from class com.verisign.epp.transport.client.EPPPlainClientSocket

      `close, getClientHostName, getConTimeout, getHostName, getInputStream, getOutputStream, getPortNumber, getSocket, initialize, initialize, isConnected, setClientHostName, setConnected, setConTimeout, setHostName, setInputStream, setOutputStream, setPortNumber, setSocket`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EPPPlainProxyClientSocket

          public EPPPlainProxyClientSocket()
                                    throws EPPConException

      Constructor for initializing a new client socket connection that goes throw one of a list of proxy servers defined by the EPP.ProxyServers configuration property.
      Throws:
        `EPPConException` - Error creating `EPPSSLProxyClientSocket` instance.

  - ### Method Detail

    - #### initialize

          public void initialize()
                          throws EPPConException

      Override of the `EPPSSLClientSocket.initialize()` that will first connect to the Apache proxy server, send the target server connection information to the proxy server, and then initialize the SSL connection through the proxy server.
      Specified by:
        `initialize` in interface `EPPClientCon`
      Overrides:
        `initialize` in class `EPPPlainClientSocket`
      Throws:
        `EPPConException` - Error with SSL connection throw the Apache proxy server

    - #### getLocator

          public static EPPProxyServersLocator getLocator()

      Gets the current `EPPProxyServersLocator` used by `EPPPlainProxyClientSocket`. The locator is a static / global setting for creating socket connections to define the set of proxy servers to connect through. The locator set can dynamically change the proxy servers to connect through. If not define before an `EPPPlainProxyClientSocket` is instantiated, the default locator is defined by the `EPP.ProxyServersLocator` configuration property.
      Returns:
        `EPPProxyServersLocator` instance if defined; `null` otherwise.

    - #### setLocator

          public static void setLocator(EPPProxyServersLocator aLocator)

      Sets the `EPPProxyServersLocator` to use when getting the list of proxy servers to connect through. If not define before an `EPPPlainProxyClientSocket` is instantiated, the default locator is defined by the `EPP.ProxyServersLocator` configuration property, so if a `EPPProxyServersLocator` objects needs further initialized outside the default constructor, `setLocator(EPPProxyServersLocator)` must be called before `EPPPlainProxyClientSocket` is instantiated indirectly in creating an `EPPSession`.
      Parameters:
        `aLocator` - `EPPProxyServersLocator` instance to use to get the list of proxy servers to connect through.