Package com.verisign.epp.util

## Class EPPEnv

- java.lang.Object
- - com.verisign.epp.util.Environment
  - - com.verisign.epp.util.EPPEnv

- Direct Known Subclasses:
    `EPPEnvSingle`

      public abstract class EPPEnv
      extends Environment

  Utility class that contains all of the SDK environment property values.

- - ### Field Summary

    - ### Fields inherited from class com.verisign.epp.util.Environment

      `properties`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EPPEnv()` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static java.lang.String` | `getClientHost()` | Gets the client host name / IP address to connect from.
    `static java.lang.String` | `getClientSocketName()` | Returns the value of the EPP.ClientSocketName property specified in the config file.
    `static java.util.Vector` | `getCmdResponseExtensions()` | Returns a vector of class names that are CommandResponseExtensions.
    `static int` | `getConTimeOut()` | Returns the connection timeout in number of milliseconds specified by the "EPP.ConTimeOut" property in the config file.
    `static boolean` | `getFullSchemaChecking()` | Gets if FullSchemaChecking is enabled on the Xerces Parser instance.
    `static java.lang.String` | `getGreetingServerName()` | Gets the server name to use in the EPP greeting.
    `static java.lang.String` | `getKeyStore()` | SSL Socket Option.
    `static EPPLoginAdapter` | `getLoginAdapter()` | Get the `EPPLoginAdapter` based on the optional "EPP.LoginAdapter" property.
    `static java.util.Vector` | `getMapFactories()` | Returns a vector of class names that are factories for each EPP Mapping.
    `static java.util.Vector` | `getPollHandlers()` | Returns a vector of class names that are factories for each EPP Mapping.
    `static EPPPollMessageFilter` | `getPollMessageFilter()` | Get the `EPPPollMessageFilter` based on the optional "EPP.PollMessageFilter" property.
    `static java.util.Vector` | `getProtocolExtensions()` | Returns a vector of class names that are ProtocolExtensions.
    `static java.lang.String` | `getProxyServerLocator()` | Gets the proxy server locator `Class` as a `String` as defined by the `EPP.ProxyServersLcoator` property.
    `static java.lang.String` | `getProxyServers()` | Returns the list of proxy servers defined by the EPP.ProxyServers property.
    `static boolean` | `getProxyServersRandomize()` | Returns whether not to randomize the proxy servers connected through.
    `static int` | `getReadTimeOut()` | Returns the read timeout in number of milliseconds specified by the "EPP.ReadTimeOut" property in the config file.
    `static java.util.List<java.lang.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.
    `static int` | `getSchemaCachingParserPoolSize()` | The number of schema caching XML Parsers to initialize in the `EPPSchemaCachingParserPool`, with a default size of 10.
    `static java.lang.String` | `getSDKVersion()` | Returns the value of the `EPP.SDKVersion` property specified in the epp.config file.
    `static EPPSendReceiveLogger` | `getSendReceiveLogger()` | Get the `EPPSendReceiveLogger` to use for logging packets being sent or received.
    `static java.lang.String` | `getServerEPPAssembler()` | Returns a vector of class names that are factories for each EPP Mapping.
    `static java.util.Vector` | `getServerEventHandlers()` | Returns a vector of class names that are factories for each EPP Mapping.
    `static java.lang.String` | `getServerName()` | Returns the value of the EPP.ServerName property specified in the config file.
    `static int` | `getServerPort()` | Returns the value of the EPP.ServerPort property specified in the config file.
    `static java.lang.String` | `getServerSocketName()` | Returns the value of the EPP.ServerSocketName property specified in the config file.
    `static java.lang.String` | `getSSLDebug()` | Gets the SSL debug setting with the default of "none".
    `static java.lang.String[]` | `getSSLEnabledCipherSuites()` | Gets the optional SSL enabled cipher suites
    `static java.lang.String[]` | `getSSLEnabledProtocols()` | SSL Socket Option.
    `static java.lang.String` | `getSSLKeyFileName()` | SSL Socket Option.
    `static java.lang.String` | `getSSLKeyManager()` | Deprecated. With change to JDK 1.4
    `static java.lang.String` | `getSSLKeyPassPhrase()` | SSL Socket Option.
    `static java.lang.String` | `getSSLPassPhrase()` | SSL Socket Option.
    `static java.lang.String` | `getSSLProtocol()` | SSL Socket Option.
    `static java.lang.String` | `getSSLTrustStoreFileName()` | Gets the SSL trust store file name.
    `static java.lang.String` | `getSSLTrustStorePassPhrase()` | Gets the SSL trust store passphrase.
    `static int` | `getTransformerPoolSize()` | The number of transformers to initialize in the `EPPTransformerPool`, with a default size of 10.
    `static boolean` | `getValidating()` | Gets if XML Schema Validation is enabled.
    `static int` | `getXMLClientParserPoolSize()` | The number of Client XML Parsers to initialize in the `EPPXMLClientParserPool`, with a default size of 10.
    `static int` | `getXMLSignatureParserPoolSize()` | The number of XML Signature Parsers to initialize in the `EPPXMLSignatureParserPool`, with a default size of 10.
    `void` | `initialize​(java.lang.String aConfigFileName)` | Initialize the environment
    `void` | `initialize​(java.lang.String aConfigFileName, java.lang.ClassLoader aClassLoader)` | Initialize the environment
    `static boolean` | `isContactRelaxedValidation()` | Checks if relaxed contact validation is enabled or not.
    `static boolean` | `isUseEntityResolver()` | Checks if use of the entity resolver is enabled or not.
    `static boolean` | `isUseUserAgent()` | Checks if inclusion of the login security extension user agent is enabled or not.

    - ### Methods inherited from class com.verisign.epp.util.Environment

      `envInitialize, envInitialize, getEnv, getOption, getProperty, getProperty, setProperties, setProperty`

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

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

- - ### Constructor Detail

    - #### EPPEnv

          public EPPEnv()

  - ### Method Detail

    - #### initialize

          public void initialize​(java.lang.String aConfigFileName,
                                 java.lang.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​(java.lang.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 java.lang.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 java.lang.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 java.lang.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.

    - #### 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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.util.Vector 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 java.util.Vector 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 java.util.Vector 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 java.util.Vector 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.

    - #### getServerEPPAssembler

          public static java.lang.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 java.lang.String getSSLProtocol()

      SSL Socket Option. Returns the type of SSL protocol
      Returns:
        String value for the property

    - #### getSSLEnabledProtocols

          public static java.lang.String[] getSSLEnabledProtocols()

      SSL Socket Option. Returns the SSL protocols supported.
      Returns:
        `String` array of protocols if defined; `null` otherwise

    - #### getSSLKeyManager

          public static java.lang.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 java.lang.String getKeyStore()

      SSL Socket Option. Returns the type of KeyStore used by ssl sockets
      Returns:
        String value for the property

    - #### getSSLKeyFileName

          public static java.lang.String getSSLKeyFileName()

      SSL Socket Option. Returns the SSL Keys filename.
      Returns:
        String value for the property

    - #### getSSLTrustStoreFileName

          public static java.lang.String getSSLTrustStoreFileName()

      Gets the SSL trust store file name.
      Returns:
        SSL trust store file name if defined;`null` otherwise.

    - #### getSSLTrustStorePassPhrase

          public static java.lang.String getSSLTrustStorePassPhrase()

      Gets the SSL trust store passphrase.
      Returns:
        SSL trust store passphrase if defined;`null` otherwise.

    - #### getSSLDebug

          public static java.lang.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 java.lang.String[] getSSLEnabledCipherSuites()

      Gets the optional SSL enabled cipher suites
      Returns:
        `>String` array if defined; `null` otherwise.

    - #### getSSLPassPhrase

          public static java.lang.String getSSLPassPhrase()

      SSL Socket Option. Returns the SSL Passphrase
      Returns:
        String value for the property

    - #### getSSLKeyPassPhrase

          public static java.lang.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 java.util.Vector 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.

    - #### getSDKVersion

          public static java.lang.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 java.util.List<java.lang.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.