Package chemaxon.calculations.services
Class ServiceDescriptorTools
java.lang.Object
chemaxon.calculations.services.ServiceDescriptorTools
Helper class for accessing
ServiceDescriptorReader and ServiceDescriptorWriter
implementations and various configuration data for services.- Since:
- 5.6
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ServiceDescriptorReaderReturns the defaultServiceDescriptorReaderinstancestatic ServiceDescriptorWriterReturns the defaultServiceDescriptorWriterinstancestatic InputStreamReturns anInputStreamwith service configuration.static InputStreamgetServiceDescriptorConfigurationAsStream(String configPath) Returns the service descriptor configuration stream from path, ornull.static InputStreamgetServiceDescriptorConfigurationAsStream(Supplier<String> urlProvider) Returns anInputStreamwith service configuration.
-
Field Details
-
SERVICE_CONFIGURATION_PATH_PROPERTY_KEY
Java System Property key to globally override default configuration path. Accepts absolute file path or URL in String format.- Since:
- 5.12
- See Also:
-
DEFAULT_SERVICE_CONFIGURATION_PATH
Path to default services configuration xml- See Also:
-
DEFAULT_USER_SERVICE_CONFIGURATION_FILENAME
name of default user service configuration file- See Also:
-
-
Constructor Details
-
ServiceDescriptorTools
public ServiceDescriptorTools()
-
-
Method Details
-
getDefaultServiceDescriptorReader
Returns the defaultServiceDescriptorReaderinstance- Returns:
- the default
ServiceDescriptorReaderinstance, ornullif no service descriptor reader is available
-
getDefaultServiceDescriptorWriter
Returns the defaultServiceDescriptorWriterinstance- Returns:
- the default
ServiceDescriptorWriterinstance, ornullif no service descriptor writer is available
-
getServiceDescriptorConfigurationAsStream
Returns anInputStreamwith service configuration.- Returns:
- an
InputStreamwith service configuration ornullif not possible to get a configuration
-
getServiceDescriptorConfigurationAsStream
Returns anInputStreamwith service configuration.- Parameters:
urlProvider- provides services configuration URL (used if the system property override is not set)- Returns:
- an
InputStreamwith service configuration ornullif not possible to get a configuration
-
getServiceDescriptorConfigurationAsStream
Returns the service descriptor configuration stream from path, ornull.- Parameters:
configPath- the path or URL to service descriptor configuration. Empty String ornullfalls back to default configuration file.- Returns:
- the service descriptor configuration stream from path, or
null - Since:
- 5.10
-