Package com.verisign.epp.util
Class EPPEnv
java.lang.Object
com.verisign.epp.util.Environment
com.verisign.epp.util.EPPEnv
- Direct Known Subclasses:
EPPEnvSingle
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGets the client host name / IP address to connect from.static StringReturns the value of the EPP.ClientSocketName property specified in the config file.Returns a vector of class names that are CommandResponseExtensions.static intReturns the connection timeout in number of milliseconds specified by the "EPP.ConTimeOut" property in the config file.getEKUsFrompPropName(String aPropName) Utility method used forgetServerEKUsandgetClientEKUsmethods that gets the EKUs given a property name.getEKUsFrompPropValue(String aPropValue) Utility method used forgetServerEKUsandgetClientEKUsmethods that gets the EKUs given a property value.static booleanGets if FullSchemaChecking is enabled on the Xerces Parser instance.static StringGets the server name to use in the EPP greeting.static StringReturns the HTTP server scheme to use, with the options being "http" and "https".static StringReturns the HTTP version to use, with the default being HTTP/2 ("2").static StringSSL Socket Option.static EPPLoginAdapterGet theEPPLoginAdapterbased on the optional "EPP.LoginAdapter" property.Returns a vector of class names that are factories for each EPP Mapping.Returns a vector of class names that are factories for each EPP Mapping.static EPPPollMessageFilterGet theEPPPollMessageFilterbased on the optional "EPP.PollMessageFilter" property.Returns a vector of class names that are ProtocolExtensions.static StringGets the proxy server locatorClassas aStringas defined by theEPP.ProxyServersLcoatorproperty.static StringReturns the list of proxy servers defined by the EPP.ProxyServers property.static booleanReturns whether not to randomize the proxy servers connected through.static intReturns the read timeout in number of milliseconds specified by the "EPP.ReadTimeOut" property in the config file.Returns a list of Registry Policy Adapter class names using the "EPP.RegistryPolicyAdapters" property, which each must implement thecom.verisign.epp.framework.EPPRegistryPolicyAdapterclass.static intThe number of schema caching XML Parsers to initialize in theEPPSchemaCachingParserPool, with a default size of 10.static StringReturns the value of theEPP.SDKVersionproperty specified in the epp.config file.static EPPSendReceiveLoggerGet theEPPSendReceiveLoggerto use for logging packets being sent or received.static StringReturns a vector of class names that are factories for each EPP Mapping.Returns a vector of class names that are factories for each EPP Mapping.static StringReturns the value of the EPP.ServerName property specified in the config file.static intReturns the value of the EPP.ServerPort property specified in the config file.static StringReturns the value of the EPP.ServerSocketName property specified in the config file.Returns a list of trusted X.509 Extended Key Usage (EKU) settings in the client certificate.static StringGets the SSL debug setting with the default of "none".static booleanGets the option of disabling the host name verification.static String[]Gets the optional SSL enabled cipher suitesstatic String[]SSL Socket Option.static StringSSL Socket Option.static StringDeprecated.With change to JDK 1.4static StringSSL Socket Option.static StringSSL Socket Option.static StringSSL Socket Option.Returns a list of trusted X.509 Extended Key Usage (EKU) settings in the server certificate.static StringGets the SSL trust store file name.static StringGets the SSL trust store passphrase.static intThe number of transformers to initialize in theEPPTransformerPool, with a default size of 10.static StringReturns the value of theEPP.UserAgentBaseNameproperty specified in the epp.config file, with a default value of "Verisign EPP SDK".static booleanGets if XML Schema Validation is enabled.static intThe number of Client XML Parsers to initialize in theEPPXMLClientParserPool, with a default size of 10.static intThe number of XML Signature Parsers to initialize in theEPPXMLSignatureParserPool, with a default size of 10.voidinitialize(String aConfigFileName) Initialize the environmentvoidinitialize(String aConfigFileName, ClassLoader aClassLoader) Initialize the environmentstatic booleanChecks if relaxed contact validation is enabled or not.static booleanChecks if use of the entity resolver is enabled or not.static booleanChecks 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
-
Constructor Details
-
EPPEnv
public EPPEnv()
-
-
Method Details
-
initialize
Initialize the environment- Parameters:
aConfigFileName- The config file read value pairs fromaClassLoader- JavaClassLoaderto load the configuration file- Throws:
EPPEnvException- Error initializing the configuration settings
-
initialize
Initialize the environment- Parameters:
aConfigFileName- The configuration file to read from- Throws:
EPPEnvException- Error initializing the configuration settings
-
getClientHost
Gets the client host name / IP address to connect from.- Returns:
- Client host name / IP address if defined;
nullotherwise
-
getServerName
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
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
Returns the value of the EPP.ServerPort property specified in the config file.- Returns:
intvalue for the property- Throws:
EPPEnvException- The "EPP.ServerPort" property does not exist.
-
getHttpVersion
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
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
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
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
Gets the proxy server locatorClassas aStringas defined by theEPP.ProxyServersLcoatorproperty.- Returns:
- Proxy server locator
Classas aString - Throws:
EPPEnvException- The "EPP.ProxyServersLocator" property does not exist.
-
getProxyServers
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
Returns whether not to randomize the proxy servers connected through. TheEPP.ProxyServersRandomizeconfiguration property is used and if it is not set the default value oftrueis returned.- Returns:
trueto randomize;falseotherwise.- Throws:
EPPEnvException- The "EPP.ProxyServersRandomizes" property does not exist.
-
getClientSocketName
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
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
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:
Vectorof fully qualifiedEPPMapFactoryclassStrings.- Throws:
EPPEnvException- Error with "EPP.MapFactories" property.
-
getProtocolExtensions
Returns a vector of class names that are ProtocolExtensions. These are the values specified by the EPP.ProtocolExtensions property in the config file.- Returns:
Vectorof fully qualifiedEPPProtocolExtensionclassStrings.- Throws:
EPPEnvException- Error with "EPP.ProtocolExtensions" property.
-
getCmdResponseExtensions
Returns a vector of class names that are CommandResponseExtensions. These are the values specified by the EPP.CmdRspExtensions property in the config file.- Returns:
Vectorof fully qualifiedEPPCmdRspExtensionsclassStrings.- Throws:
EPPEnvException- Error with "EPP.CmdRspExtensions" property.
-
getServerEventHandlers
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:
Vectorof fully qualifiedEPPMapFactoryclassStrings.- Throws:
EPPEnvException- Error with "EPP.ServerEventHandlers" property.
-
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 theX509Certificate.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:
Listof fully qualified X.509 Extended Key Usage (EKU) values ornullif there is not EPP.SSLClientEKUs setting.
-
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 theX509Certificate.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:
Listof fully qualified X.509 Extended Key Usage (EKU) values ornullif there is not EPP.ServerEKUs setting.
-
getEKUsFrompPropName
Utility method used forgetServerEKUsandgetClientEKUsmethods that gets the EKUs given a property name.- Parameters:
aPropName- EKU configuration property name, which consists of a list of integer values appended to theEKU_OIDconstant value.- Returns:
- List of trusted fully qualified X.509 Extended Key Usage (EKU)
values trusted or
nullif undefined and the EKU should be ignored.
-
getEKUsFrompPropValue
Utility method used forgetServerEKUsandgetClientEKUsmethods that gets the EKUs given a property value.- Parameters:
aPropValue- EKU configuration property value, which consists of a list of integer values appended to theEKU_OIDconstant value.- Returns:
- List of trusted fully qualified X.509 Extended Key Usage (EKU)
values trusted or
nullif undefined and the EKU should be ignored.
-
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:
Vectorof fully qualifiedEPPMapFactoryclassStrings.
-
getSSLProtocol
SSL Socket Option. Returns the type of SSL protocol- Returns:
- String value for the property
-
getSSLEnabledProtocols
SSL Socket Option. Returns the SSL protocols supported.- Returns:
Stringarray of protocols if defined;nullotherwise
-
getSSLKeyManager
Deprecated.With change to JDK 1.4SSL Socket Option. Returns the type of KeyManager used by ssl sockets- Returns:
- String value for the property
-
getKeyStore
SSL Socket Option. Returns the type of KeyStore used by ssl sockets- Returns:
- String value for the property
-
getSSLKeyFileName
SSL Socket Option. Returns the SSL Keys filename.- Returns:
- String value for the property
-
getSSLTrustStoreFileName
Gets the SSL trust store file name.- Returns:
- SSL trust store file name if defined;
nullotherwise.
-
getSSLTrustStorePassPhrase
Gets the SSL trust store passphrase.- Returns:
- SSL trust store passphrase if defined;
nullotherwise.
-
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
Gets the optional SSL enabled cipher suites- Returns:
>Stringarray if defined;nullotherwise.
-
getSSLDisableHostnameVerification
public static boolean getSSLDisableHostnameVerification()Gets the option of disabling the host name verification. The default value offalseif not defined with the "EPP.SSLDisableHostnameVerification" config property.- Returns:
- Disable the SSL host name verification?
-
getSSLPassPhrase
SSL Socket Option. Returns the SSL Passphrase- Returns:
- String value for the property
-
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 theEPPXMLClientParserPool, 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 theEPPSchemaCachingParserPool, 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 theEPPTransformerPool, 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 theEPPXMLSignatureParserPool, with a default size of 10.- Returns:
- XML Signature Parsers to initialize in the
EPPXMLSignatureParserPool
-
getPollHandlers
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:
Vectorof fully qualifiedEPPPollHandlerclassStrings.- Throws:
EPPEnvException- Error with "EPP.PollHandlers" property.
-
getValidating
public static boolean getValidating()Gets if XML Schema Validation is enabled. The default isfalse, but this can be changed by setting theEPP.Validatingproperty.- Returns:
trueto enable XML Schema Validation;falseotherwise.
-
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 isfalse, but this can be changed by setting theEPP.FullSchemaCheckingproperty.- Returns:
trueto enable Full XML Schema Checking;falseotherwise.
-
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 isfalse, but this can be changed by setting theEPP.Contact.RelaxedValidationproperty.- Returns:
trueto enable relaxed contact validations;falseotherwise.
-
isUseEntityResolver
public static boolean isUseEntityResolver()Checks if use of the entity resolver is enabled or not. If the entity resolver is enabled, theEPPSchemaCachingEntityResolverwill 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 istrue, but this can be changed by setting theEPP.UseEntityResolverproperty.- Returns:
trueto enable use of the entity resolver;falseotherwise.
-
getSendReceiveLogger
Get theEPPSendReceiveLoggerto use for logging packets being sent or received. The default is to useEPPRawSendReceiveLoggerif not overridden with the "EPP.SendReceiveLogger" property.- Returns:
EPPSendReceiveLoggerinstance to use with the default ofEPPRawSendReceiveLogger.
-
getLoginAdapter
Get theEPPLoginAdapterbased on the optional "EPP.LoginAdapter" property. If the property is not set, there will be no assignedEPPLoginAdapter.- Returns:
EPPLoginAdapterinstance to use when establishing anEPPSessionif defined;nullotherwise.
-
isUseUserAgent
public static boolean isUseUserAgent()Checks if inclusion of the login security extension user agent is enabled or not. The default istrue, but this can be changed by setting theEPP.UseUserAgentproperty tofalse.- Returns:
trueto enable use of the login security extension user agent;falseotherwise.
-
getUserAgentBaseName
Returns the value of theEPP.UserAgentBaseNameproperty specified in the epp.config file, with a default value of "Verisign EPP SDK".- Returns:
- Value of the
EPP.UserAgentBaseNameproperty if defined; "Verisign EPP SDK" otherwise.
-
getSDKVersion
Returns the value of theEPP.SDKVersionproperty specified in the epp.config file.- Returns:
- Value of the
EPP.SDKVersionproperty if defined;nullotherwise.
-
getPollMessageFilter
Get theEPPPollMessageFilterbased on the optional "EPP.PollMessageFilter" property. If the property is not set, there will be no assignedEPPPollMessageFilter.- Returns:
EPPPollMessageFilterinstance to use returning poll messages based on the client login services.
-
getRegistryPolicyAdapters
Returns a list of Registry Policy Adapter class names using the "EPP.RegistryPolicyAdapters" property, which each must implement thecom.verisign.epp.framework.EPPRegistryPolicyAdapterclass.- Returns:
- List of fully qualified
com.verisign.epp.framework.EPPRegistryPolicyAdapterclass names if defined;nullotherwise.
-