Class EPPEnv

Direct Known Subclasses:
EPPEnvSingle

public abstract class EPPEnv extends Environment
Utility class that contains all of the SDK environment property values.
  • Constructor Details

    • EPPEnv

      public EPPEnv()
  • Method Details

    • initialize

      public void initialize(String aConfigFileName, ClassLoader aClassLoader) throws EPPEnvException
      Initialize the environment
      Parameters:
      aConfigFileName - The config file read value pairs from
      aClassLoader - Java ClassLoader to load the configuration file
      Throws:
      EPPEnvException - Error initializing the configuration settings
    • initialize

      public void initialize(String aConfigFileName) throws EPPEnvException
      Initialize the environment
      Parameters:
      aConfigFileName - The configuration file to read from
      Throws:
      EPPEnvException - Error initializing the configuration settings
    • getClientHost

      public static String getClientHost()
      Gets the client host name / IP address to connect from.
      Returns:
      Client host name / IP address if defined;null otherwise
    • getServerName

      public static String getServerName() throws EPPEnvException
      Returns the value of the EPP.ServerName property specified in the config file.
      Returns:
      String value for the property
      Throws:
      EPPEnvException - The "EPP.ServerName" property does not exist.
    • getGreetingServerName

      public static String getGreetingServerName()
      Gets the server name to use in the EPP greeting. If not set in the configuration file, the default value of "EPP Server Stub" is returned;
      Returns:
      Greeting Server Name if defined; "EPP Server Stub" otherwise.
    • getServerPort

      public static int getServerPort() throws EPPEnvException
      Returns the value of the EPP.ServerPort property specified in the config file.
      Returns:
      int value for the property
      Throws:
      EPPEnvException - The "EPP.ServerPort" property does not exist.
    • getHttpVersion

      public static String getHttpVersion() throws EPPEnvException
      Returns the HTTP version to use, with the default being HTTP/2 ("2").
      Returns:
      String value for the HTTP version, with the possible set of values being "1.1" for HTTP/1.1, "2" for HTTP/2, and future "3" for HTTP/3.
      Throws:
      EPPEnvException - The "EPP.HttpVersion" property is invalid.
    • getHttpServerScheme

      public static String getHttpServerScheme() throws EPPEnvException
      Returns the HTTP server scheme to use, with the options being "http" and "https".
      Returns:
      The HTTP server scheme to use, with the options being "http" or "https".
      Throws:
      EPPEnvException - The "EPP.HttpServerScheme" property does not exist.
    • getConTimeOut

      public static int getConTimeOut() throws EPPEnvException
      Returns the connection timeout in number of milliseconds specified by the "EPP.ConTimeOut" property in the config file.
      Returns:
      int value for the property
      Throws:
      EPPEnvException - The "EPP.ConTimeOut" property does not exist.
    • getReadTimeOut

      public static int getReadTimeOut() throws EPPEnvException
      Returns the read timeout in number of milliseconds specified by the "EPP.ReadTimeOut" property in the config file. If the "EPP.ReadTimeOut" property is not set, then the "EPP.ConTimeOut" property is used.
      Returns:
      int value for the property
      Throws:
      EPPEnvException - The "EPP.ReadTimeOut" property and the "EPP.ConTimeOut" property does not exist.
    • getProxyServerLocator

      public static String getProxyServerLocator() throws EPPEnvException
      Gets the proxy server locator Class as a String as defined by the EPP.ProxyServersLcoator property.
      Returns:
      Proxy server locator Class as a String
      Throws:
      EPPEnvException - The "EPP.ProxyServersLocator" property does not exist.
    • getProxyServers

      public static String getProxyServers() throws EPPEnvException
      Returns the list of proxy servers defined by the EPP.ProxyServers property. The format of the EPP.ProxyServers property should be:

      <server name>:<port>[,<server name>:<port>]*

      <server name> ::= <ip> | logical server name
      <ip> ::= IPv4 address | [<IPv6 address>]

      An example of a EPP.ProxyServers value is:

      samplehost:80,[2620:74:13:3000::80]:80,192.168.10.10:88
      Returns:
      String value for the property
      Throws:
      EPPEnvException - The "EPP.ProxyServers" property does not exist.
    • getProxyServersRandomize

      public static boolean getProxyServersRandomize() throws EPPEnvException
      Returns whether not to randomize the proxy servers connected through. The EPP.ProxyServersRandomize configuration property is used and if it is not set the default value of true is returned.
      Returns:
      true to randomize;false otherwise.
      Throws:
      EPPEnvException - The "EPP.ProxyServersRandomizes" property does not exist.
    • getClientSocketName

      public static String getClientSocketName() throws EPPEnvException
      Returns the value of the EPP.ClientSocketName property specified in the config file.
      Returns:
      String value for the property
      Throws:
      EPPEnvException - The "EPP.ClientSocketName" property does not exist.
    • getServerSocketName

      public static String getServerSocketName() throws EPPEnvException
      Returns the value of the EPP.ServerSocketName property specified in the config file. This is the class that is instantiated that listens for connections.
      Returns:
      int value for the property
      Throws:
      EPPEnvException - Error with "EPP.ServerSocketName" property.
    • getMapFactories

      public static Vector<String> getMapFactories() throws EPPEnvException
      Returns a vector of class names that are factories for each EPP Mapping. These are the values specified by the EPP.MapFactories property in the config file.
      Returns:
      Vector of fully qualified EPPMapFactory class Strings.
      Throws:
      EPPEnvException - Error with "EPP.MapFactories" property.
    • getProtocolExtensions

      public static Vector<String> getProtocolExtensions() throws EPPEnvException
      Returns a vector of class names that are ProtocolExtensions. These are the values specified by the EPP.ProtocolExtensions property in the config file.
      Returns:
      Vector of fully qualified EPPProtocolExtension class Strings.
      Throws:
      EPPEnvException - Error with "EPP.ProtocolExtensions" property.
    • getCmdResponseExtensions

      public static Vector<String> getCmdResponseExtensions() throws EPPEnvException
      Returns a vector of class names that are CommandResponseExtensions. These are the values specified by the EPP.CmdRspExtensions property in the config file.
      Returns:
      Vector of fully qualified EPPCmdRspExtensions class Strings.
      Throws:
      EPPEnvException - Error with "EPP.CmdRspExtensions" property.
    • getServerEventHandlers

      public static Vector<String> getServerEventHandlers() throws EPPEnvException
      Returns a vector of class names that are factories for each EPP Mapping. These are the values specified by the EPP.MapFactories property in the config file.
      Returns:
      Vector of fully qualified EPPMapFactory class Strings.
      Throws:
      EPPEnvException - Error with "EPP.ServerEventHandlers" property.
    • getSSLClientEKUs

      public static List<String> getSSLClientEKUs()
      Returns a list of trusted X.509 Extended Key Usage (EKU) settings in the client certificate. The values returned are fully qualified EKU Object Identifier (OID) values that can be matched up with the values returned in the X509Certificate.getExtendedKeyUsage() method. If there is no EPP.SSLClientEKUs setting, then the EKU settings in the client certificate will be ignored. The values are integer values that are appending to the base EKU_OID constant value "1.3.6.1.5.5.7.3" with a "." seperator. The IANA Structure of Management Information (SMI) Numbers registry.
      Returns:
      List of fully qualified X.509 Extended Key Usage (EKU) values or null if there is not EPP.SSLClientEKUs setting.
    • getSSLServerEKUs

      public static List<String> getSSLServerEKUs()
      Returns a list of trusted X.509 Extended Key Usage (EKU) settings in the server certificate. The values returned are fully qualified EKU Object Identifier (OID) values that can be matched up with the values returned in the X509Certificate.getExtendedKeyUsage() method. If there is no EPP.SSLServerEKUs setting, then the EKU settings in the server certificate will be ignored. The values are integer values that are appending to the base EKU_OID constant value "1.3.6.1.5.5.7.3" with a "." seperator. The IANA Structure of Management Information (SMI) Numbers registry.
      Returns:
      List of fully qualified X.509 Extended Key Usage (EKU) values or null if there is not EPP.ServerEKUs setting.
    • getEKUsFrompPropName

      public static List<String> getEKUsFrompPropName(String aPropName)
      Utility method used for getServerEKUs and getClientEKUs methods that gets the EKUs given a property name.
      Parameters:
      aPropName - EKU configuration property name, which consists of a list of integer values appended to the EKU_OID constant value.
      Returns:
      List of trusted fully qualified X.509 Extended Key Usage (EKU) values trusted or null if undefined and the EKU should be ignored.
    • getEKUsFrompPropValue

      public static List<String> getEKUsFrompPropValue(String aPropValue)
      Utility method used for getServerEKUs and getClientEKUs methods that gets the EKUs given a property value.
      Parameters:
      aPropValue - EKU configuration property value, which consists of a list of integer values appended to the EKU_OID constant value.
      Returns:
      List of trusted fully qualified X.509 Extended Key Usage (EKU) values trusted or null if undefined and the EKU should be ignored.
    • getServerEPPAssembler

      public static String getServerEPPAssembler()
      Returns a vector of class names that are factories for each EPP Mapping. These are the values specified by the EPP.MapFactories property in the config file.
      Returns:
      Vector of fully qualified EPPMapFactory class Strings.
    • getSSLProtocol

      public static String getSSLProtocol()
      SSL Socket Option. Returns the type of SSL protocol
      Returns:
      String value for the property
    • getSSLEnabledProtocols

      public static String[] getSSLEnabledProtocols()
      SSL Socket Option. Returns the SSL protocols supported.
      Returns:
      String array of protocols if defined; null otherwise
    • getSSLKeyManager

      @Deprecated public static String getSSLKeyManager()
      Deprecated.
      With change to JDK 1.4
      SSL Socket Option. Returns the type of KeyManager used by ssl sockets
      Returns:
      String value for the property
    • getKeyStore

      public static String getKeyStore()
      SSL Socket Option. Returns the type of KeyStore used by ssl sockets
      Returns:
      String value for the property
    • getSSLKeyFileName

      public static String getSSLKeyFileName()
      SSL Socket Option. Returns the SSL Keys filename.
      Returns:
      String value for the property
    • getSSLTrustStoreFileName

      public static String getSSLTrustStoreFileName()
      Gets the SSL trust store file name.
      Returns:
      SSL trust store file name if defined;null otherwise.
    • getSSLTrustStorePassPhrase

      public static String getSSLTrustStorePassPhrase()
      Gets the SSL trust store passphrase.
      Returns:
      SSL trust store passphrase if defined;null otherwise.
    • getSSLDebug

      public static String getSSLDebug()
      Gets the SSL debug setting with the default of "none". Possible values include:

      • none - No debug
      • all - All debug
      Returns:
      Value of javax.net.debug property if defined; "none" otherwise.
    • getSSLEnabledCipherSuites

      public static String[] getSSLEnabledCipherSuites()
      Gets the optional SSL enabled cipher suites
      Returns:
      >String array if defined; null otherwise.
    • getSSLDisableHostnameVerification

      public static boolean getSSLDisableHostnameVerification()
      Gets the option of disabling the host name verification. The default value of false if not defined with the "EPP.SSLDisableHostnameVerification" config property.
      Returns:
      Disable the SSL host name verification?
    • getSSLPassPhrase

      public static String getSSLPassPhrase()
      SSL Socket Option. Returns the SSL Passphrase
      Returns:
      String value for the property
    • getSSLKeyPassPhrase

      public static String getSSLKeyPassPhrase()
      SSL Socket Option. Returns the SSL Key Passphrase. If this property is not defined, than EPP.SSLPassPhrase should be used for both the store passphrase and the key passphrase.
      Returns:
      String value for the property
    • getXMLClientParserPoolSize

      public static int getXMLClientParserPoolSize()
      The number of Client XML Parsers to initialize in the EPPXMLClientParserPool, with a default size of 10.
      Returns:
      XML Server Parsers to initialize in the EPPXMLClientParserPool
    • getSchemaCachingParserPoolSize

      public static int getSchemaCachingParserPoolSize()
      The number of schema caching XML Parsers to initialize in the EPPSchemaCachingParserPool, with a default size of 10.
      Returns:
      Number of schema caching XML Parsers to initialize in the EPPSchemaCachingParserPool
    • getTransformerPoolSize

      public static int getTransformerPoolSize()
      The number of transformers to initialize in the EPPTransformerPool, with a default size of 10.
      Returns:
      Number of transformers to initialize in the EPPTransformerPool
    • getXMLSignatureParserPoolSize

      public static int getXMLSignatureParserPoolSize()
      The number of XML Signature Parsers to initialize in the EPPXMLSignatureParserPool, with a default size of 10.
      Returns:
      XML Signature Parsers to initialize in the EPPXMLSignatureParserPool
    • getPollHandlers

      public static Vector<String> getPollHandlers() throws EPPEnvException
      Returns a vector of class names that are factories for each EPP Mapping. These are the values specified by the EPP.MapFactories property in the config file.
      Returns:
      Vector of fully qualified EPPPollHandler class Strings.
      Throws:
      EPPEnvException - Error with "EPP.PollHandlers" property.
    • getValidating

      public static boolean getValidating()
      Gets if XML Schema Validation is enabled. The default is false, but this can be changed by setting the EPP.Validating property.
      Returns:
      true to enable XML Schema Validation; false otherwise.
    • getFullSchemaChecking

      public static boolean getFullSchemaChecking()
      Gets if FullSchemaChecking is enabled on the Xerces Parser instance. Enable full schema grammar constraint checking, including checking which may be time-consuming or memory intensive. Currently, particle unique attribution constraint checking and particle derivation resriction checking are controlled by this option. The default is false, but this can be changed by setting the EPP.FullSchemaChecking property.
      Returns:
      true to enable Full XML Schema Checking; false otherwise.
    • isContactRelaxedValidation

      public static boolean isContactRelaxedValidation()
      Checks if relaxed contact validation is enabled or not. If the validation is relaxed, the a special XSD with relaxed validation will be used. If set to false, RFC compliant XSD with all validations will be used. The default is false, but this can be changed by setting the EPP.Contact.RelaxedValidation property.
      Returns:
      true to enable relaxed contact validations; false otherwise.
    • isUseEntityResolver

      public static boolean isUseEntityResolver()
      Checks if use of the entity resolver is enabled or not. If the entity resolver is enabled, the EPPSchemaCachingEntityResolver will be set in the XML parsers and will dynamically load XML schemas that have not already been loaded. If the entity resolver is not enabled, only the XML schemas pre-loaded will be included in the XML parsing. The default is true, but this can be changed by setting the EPP.UseEntityResolver property.
      Returns:
      true to enable use of the entity resolver; false otherwise.
    • getSendReceiveLogger

      public static EPPSendReceiveLogger getSendReceiveLogger()
      Get the EPPSendReceiveLogger to use for logging packets being sent or received. The default is to use EPPRawSendReceiveLogger if not overridden with the "EPP.SendReceiveLogger" property.
      Returns:
      EPPSendReceiveLogger instance to use with the default of EPPRawSendReceiveLogger.
    • getLoginAdapter

      public static EPPLoginAdapter getLoginAdapter()
      Get the EPPLoginAdapter based on the optional "EPP.LoginAdapter" property. If the property is not set, there will be no assigned EPPLoginAdapter.
      Returns:
      EPPLoginAdapter instance to use when establishing an EPPSession if defined; null otherwise.
    • isUseUserAgent

      public static boolean isUseUserAgent()
      Checks if inclusion of the login security extension user agent is enabled or not. The default is true, but this can be changed by setting the EPP.UseUserAgent property to false.
      Returns:
      true to enable use of the login security extension user agent; false otherwise.
    • getUserAgentBaseName

      public static String getUserAgentBaseName()
      Returns the value of the EPP.UserAgentBaseName property specified in the epp.config file, with a default value of "Verisign EPP SDK".
      Returns:
      Value of the EPP.UserAgentBaseName property if defined; "Verisign EPP SDK" otherwise.
    • getSDKVersion

      public static String getSDKVersion()
      Returns the value of the EPP.SDKVersion property specified in the epp.config file.
      Returns:
      Value of the EPP.SDKVersion property if defined; null otherwise.
    • getPollMessageFilter

      public static EPPPollMessageFilter getPollMessageFilter()
      Get the EPPPollMessageFilter based on the optional "EPP.PollMessageFilter" property. If the property is not set, there will be no assigned EPPPollMessageFilter.
      Returns:
      EPPPollMessageFilter instance to use returning poll messages based on the client login services.
    • getRegistryPolicyAdapters

      public static List<String> getRegistryPolicyAdapters()
      Returns a list of Registry Policy Adapter class names using the "EPP.RegistryPolicyAdapters" property, which each must implement the com.verisign.epp.framework.EPPRegistryPolicyAdapter class.
      Returns:
      List of fully qualified com.verisign.epp.framework.EPPRegistryPolicyAdapter class names if defined; null otherwise.