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.StringgetClientHost()Gets the client host name / IP address to connect from.static java.lang.StringgetClientSocketName()Returns the value of the EPP.ClientSocketName property specified in the config file.static java.util.Vector<java.lang.String>getCmdResponseExtensions()Returns a vector of class names that are CommandResponseExtensions.static intgetConTimeOut()Returns the connection timeout in number of milliseconds specified by the "EPP.ConTimeOut" property in the config file.static booleangetFullSchemaChecking()Gets if FullSchemaChecking is enabled on the Xerces Parser instance.static java.lang.StringgetGreetingServerName()Gets the server name to use in the EPP greeting.static java.lang.StringgetHttpServerScheme()Returns the HTTP server scheme to use, with the options being "http" and "https".static java.lang.StringgetHttpVersion()Returns the HTTP version to use, with the default being HTTP/2 ("2").static java.lang.StringgetKeyStore()SSL Socket Option.static EPPLoginAdaptergetLoginAdapter()Get theEPPLoginAdapterbased on the optional "EPP.LoginAdapter" property.static java.util.Vector<java.lang.String>getMapFactories()Returns a vector of class names that are factories for each EPP Mapping.static java.util.Vector<java.lang.String>getPollHandlers()Returns a vector of class names that are factories for each EPP Mapping.static EPPPollMessageFiltergetPollMessageFilter()Get theEPPPollMessageFilterbased on the optional "EPP.PollMessageFilter" property.static java.util.Vector<java.lang.String>getProtocolExtensions()Returns a vector of class names that are ProtocolExtensions.static java.lang.StringgetProxyServerLocator()Gets the proxy server locatorClassas aStringas defined by theEPP.ProxyServersLcoatorproperty.static java.lang.StringgetProxyServers()Returns the list of proxy servers defined by the EPP.ProxyServers property.static booleangetProxyServersRandomize()Returns whether not to randomize the proxy servers connected through.static intgetReadTimeOut()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 thecom.verisign.epp.framework.EPPRegistryPolicyAdapterclass.static intgetSchemaCachingParserPoolSize()The number of schema caching XML Parsers to initialize in theEPPSchemaCachingParserPool, with a default size of 10.static java.lang.StringgetSDKVersion()Returns the value of theEPP.SDKVersionproperty specified in the epp.config file.static EPPSendReceiveLoggergetSendReceiveLogger()Get theEPPSendReceiveLoggerto use for logging packets being sent or received.static java.lang.StringgetServerEPPAssembler()Returns a vector of class names that are factories for each EPP Mapping.static java.util.Vector<java.lang.String>getServerEventHandlers()Returns a vector of class names that are factories for each EPP Mapping.static java.lang.StringgetServerName()Returns the value of the EPP.ServerName property specified in the config file.static intgetServerPort()Returns the value of the EPP.ServerPort property specified in the config file.static java.lang.StringgetServerSocketName()Returns the value of the EPP.ServerSocketName property specified in the config file.static java.lang.StringgetSSLDebug()Gets the SSL debug setting with the default of "none".static booleangetSSLDisableHostnameVerification()Gets the option of disabling the host name verification.static java.lang.String[]getSSLEnabledCipherSuites()Gets the optional SSL enabled cipher suitesstatic java.lang.String[]getSSLEnabledProtocols()SSL Socket Option.static java.lang.StringgetSSLKeyFileName()SSL Socket Option.static java.lang.StringgetSSLKeyManager()Deprecated.With change to JDK 1.4static java.lang.StringgetSSLKeyPassPhrase()SSL Socket Option.static java.lang.StringgetSSLPassPhrase()SSL Socket Option.static java.lang.StringgetSSLProtocol()SSL Socket Option.static java.lang.StringgetSSLTrustStoreFileName()Gets the SSL trust store file name.static java.lang.StringgetSSLTrustStorePassPhrase()Gets the SSL trust store passphrase.static intgetTransformerPoolSize()The number of transformers to initialize in theEPPTransformerPool, with a default size of 10.static booleangetValidating()Gets if XML Schema Validation is enabled.static intgetXMLClientParserPoolSize()The number of Client XML Parsers to initialize in theEPPXMLClientParserPool, with a default size of 10.static intgetXMLSignatureParserPoolSize()The number of XML Signature Parsers to initialize in theEPPXMLSignatureParserPool, with a default size of 10.voidinitialize(java.lang.String aConfigFileName)Initialize the environmentvoidinitialize(java.lang.String aConfigFileName, java.lang.ClassLoader aClassLoader)Initialize the environmentstatic booleanisContactRelaxedValidation()Checks if relaxed contact validation is enabled or not.static booleanisUseEntityResolver()Checks if use of the entity resolver is enabled or not.static booleanisUseUserAgent()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
-
-
-
-
Method Detail
-
initialize
public void initialize(java.lang.String aConfigFileName, java.lang.ClassLoader aClassLoader) throws EPPEnvExceptionInitialize the environment- Parameters:
aConfigFileName- The config file read value pairs fromaClassLoader- JavaClassLoaderto load the configuration file- Throws:
EPPEnvException- Error initializing the configuration settings
-
initialize
public void initialize(java.lang.String aConfigFileName) throws EPPEnvExceptionInitialize 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;
nullotherwise
-
getServerName
public static java.lang.String getServerName() throws EPPEnvExceptionReturns 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 EPPEnvExceptionReturns 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
public static java.lang.String getHttpVersion() throws EPPEnvExceptionReturns 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 java.lang.String getHttpServerScheme() throws EPPEnvExceptionReturns 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 EPPEnvExceptionReturns 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 EPPEnvExceptionReturns 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 EPPEnvExceptionGets 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
public static java.lang.String getProxyServers() throws EPPEnvExceptionReturns 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 EPPEnvExceptionReturns 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
public static java.lang.String getClientSocketName() throws EPPEnvExceptionReturns 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 EPPEnvExceptionReturns 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<java.lang.String> getMapFactories() throws EPPEnvExceptionReturns 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
public static java.util.Vector<java.lang.String> getProtocolExtensions() throws EPPEnvExceptionReturns 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
public static java.util.Vector<java.lang.String> getCmdResponseExtensions() throws EPPEnvExceptionReturns 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
public static java.util.Vector<java.lang.String> getServerEventHandlers() throws EPPEnvExceptionReturns 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.
-
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:
Vectorof fully qualifiedEPPMapFactoryclassStrings.
-
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:
Stringarray of protocols if defined;nullotherwise
-
getSSLKeyManager
@Deprecated public static java.lang.String 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
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;
nullotherwise.
-
getSSLTrustStorePassPhrase
public static java.lang.String getSSLTrustStorePassPhrase()
Gets the SSL trust store passphrase.- Returns:
- SSL trust store passphrase if defined;
nullotherwise.
-
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:
>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
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 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
public static java.util.Vector<java.lang.String> getPollHandlers() throws EPPEnvExceptionReturns 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
public static EPPSendReceiveLogger 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
public static EPPLoginAdapter 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.
-
getSDKVersion
public static java.lang.String getSDKVersion()
Returns the value of theEPP.SDKVersionproperty specified in the epp.config file.- Returns:
- Value of the
EPP.SDKVersionproperty if defined;nullotherwise.
-
getPollMessageFilter
public static EPPPollMessageFilter 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
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 thecom.verisign.epp.framework.EPPRegistryPolicyAdapterclass.- Returns:
- List of fully qualified
com.verisign.epp.framework.EPPRegistryPolicyAdapterclass names if defined;nullotherwise.
-
-