Class EPPProxyServer
- java.lang.Object
-
- com.verisign.epp.transport.client.EPPProxyServer
-
public class EPPProxyServer extends java.lang.ObjectRepresents a Proxy Server with an IP address / Host Name and a port number. Utility methods are includes to help parse theEPPEnv.getProxyServers()value which is driven by theEPP.ProxyServersconfiguration property.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_PORTConstant for when no port has been defined.
-
Constructor Summary
Constructors Constructor Description EPPProxyServer()Default constructorEPPProxyServer(java.lang.String aServerName, int aServerPort)Constructor that takes both the server name and port.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecodeConfigItem(java.lang.String aConfigItem)Parsing a proxy server configuration item that meets the regular expression.java.lang.StringgetServerName()Gets the proxy server name or IP address.intgetServerPort()Gets the proxy server port number.voidsetServerName(java.lang.String aServerName)Sets the proxy server name or IP address.voidsetServerPort(int aServerPort)Sets the proxy server port number.java.lang.StringtoString()Convert theEPPProxyServerattributes into aStringby 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.
-
-
-
Constructor Detail
-
EPPProxyServer
public EPPProxyServer()
Default constructor
-
EPPProxyServer
public EPPProxyServer(java.lang.String aServerName, int aServerPort)Constructor that takes both the server name and port.- Parameters:
aServerName- Server name or IP address of proxy serveraServerPort- Server port of proxy server
-
-
Method Detail
-
getServerName
public java.lang.String getServerName()
Gets the proxy server name or IP address.- Returns:
- Proxy server name if set;
nullotherwise.
-
setServerName
public void setServerName(java.lang.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_PORTif 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(java.lang.String aConfigItem) throws EPPConExceptionParsing 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 theaConfigItem
-
toString
public java.lang.String toString()
Convert theEPPProxyServerattributes into aStringby 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:
toStringin classjava.lang.Object- Returns:
- Encoded
EPPProxyServeras aString
-
-