Class EPPProxyServer

java.lang.Object
com.verisign.epp.transport.client.EPPProxyServer

public class EPPProxyServer extends Object
Represents a Proxy Server with an IP address / Host Name and a port number. Utility methods are includes to help parse the EPPEnv.getProxyServers() value which is driven by the EPP.ProxyServers configuration property.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static int
    Constant for when no port has been defined.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor
    EPPProxyServer(String aServerName, int aServerPort)
    Constructor that takes both the server name and port.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    decodeConfigItem(String aConfigItem)
    Parsing a proxy server configuration item that meets the regular expression.
    Gets the proxy server name or IP address.
    int
    Gets the proxy server port number.
    void
    setServerName(String aServerName)
    Sets the proxy server name or IP address.
    void
    setServerPort(int aServerPort)
    Sets the proxy server port number.
    Convert the EPPProxyServer attributes into a String by separating the name and port with a colon and enclosing the name in braces if the name contains a colon to support encoding an IPv6 proxy server.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEFAULT_PORT

      public static int DEFAULT_PORT
      Constant for when no port has been defined.
  • Constructor Details

    • EPPProxyServer

      public EPPProxyServer()
      Default constructor
    • EPPProxyServer

      public EPPProxyServer(String aServerName, int aServerPort)
      Constructor that takes both the server name and port.
      Parameters:
      aServerName - Server name or IP address of proxy server
      aServerPort - Server port of proxy server
  • Method Details

    • getServerName

      public String getServerName()
      Gets the proxy server name or IP address.
      Returns:
      Proxy server name if set; null otherwise.
    • setServerName

      public void setServerName(String aServerName)
      Sets the proxy server name or IP address.
      Parameters:
      aServerName - Proxy server name or IP address.
    • getServerPort

      public int getServerPort()
      Gets the proxy server port number.
      Returns:
      proxy server port number with default of DEFAULT_PORT if not explicitly set.
    • setServerPort

      public void setServerPort(int aServerPort)
      Sets the proxy server port number.
      Parameters:
      aServerPort - proxy server port number
    • decodeConfigItem

      public void decodeConfigItem(String aConfigItem) throws EPPConException
      Parsing a proxy server configuration item that meets the regular expression. "^\[?(\S+)\]?:(\d+)$". IPv6 addresses need to be encapsulated in brackets since they use ':' as a separator.
      Parameters:
      aConfigItem - Proxy server configuration item to parse
      Throws:
      EPPConException - failure in parsing the aConfigItem
    • toString

      public String toString()
      Convert the EPPProxyServer attributes into a String by separating the name and port with a colon and enclosing the name in braces if the name contains a colon to support encoding an IPv6 proxy server.
      Overrides:
      toString in class Object
      Returns:
      Encoded EPPProxyServer as a String