Class ServiceConfigurationBase
java.lang.Object
eu.cloudnetservice.driver.service.ServiceConfigurationBase
- All Implemented Interfaces:
DefaultedDocPropertyHolder,DocPropertyHolder
- Direct Known Subclasses:
GroupConfiguration,ServiceConfiguration,ServiceTask
The base configuration class for everything which can configure a service in any way. It holds the most common
information which every component managing a service should provide to a user.
- Since:
- 4.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classServiceConfigurationBase.Builder<T extends ServiceConfigurationBase, B extends ServiceConfigurationBase.Builder<T,B>> The base builder class for everything which is a service configuration.Nested classes/interfaces inherited from interface eu.cloudnetservice.driver.document.property.DefaultedDocPropertyHolder
DefaultedDocPropertyHolder.Mutable<S extends DocPropertyHolder.Mutable<S>> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Set<ServiceDeployment> protected final Set<ServiceRemoteInclusion> protected final Documentprotected final Set<ServiceTemplate> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedServiceConfigurationBase(@NonNull Set<ServiceTemplate> templates, @NonNull Set<ServiceDeployment> deployments, @NonNull Set<ServiceRemoteInclusion> includes, @NonNull Document properties) Constructs a new service configuration base instance. -
Method Summary
Modifier and TypeMethodDescriptionGet all deployments that should be added initially to services created based on this configuration.abstract @Unmodifiable @NonNull Map<String, String> Get the environment variables which should get appended to all environments of services which are created based on this configuration.Get all includes which should be added initially to services created based on this configuration.abstract @Unmodifiable @NonNull Collection<String> Get the jvm options which should get applied to the service command line.abstract @Unmodifiable @NonNull Collection<String> Get the process parameters which should get appended to the command line.Get the underlying document that all read and write operations are delegated to.Get all templates that should get copied onto services created based on this configuration when preparing.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface eu.cloudnetservice.driver.document.property.DefaultedDocPropertyHolder
propertyAbsent, propertyPresent, readProperty, readPropertyOrDefault, readPropertyOrGet, readPropertyOrThrow, readPropertyOrThrow
-
Field Details
-
templates
-
deployments
-
includes
-
properties
-
-
Constructor Details
-
ServiceConfigurationBase
protected ServiceConfigurationBase(@NonNull @NonNull Set<ServiceTemplate> templates, @NonNull @NonNull Set<ServiceDeployment> deployments, @NonNull @NonNull Set<ServiceRemoteInclusion> includes, @NonNull @NonNull Document properties) Constructs a new service configuration base instance.- Parameters:
templates- the templates which should be loaded to all services created based on the configuration.deployments- the deployment which should be added to all services created based on the configuration.includes- the includes which should be loaded to all services created based on the configuration.properties- the properties of the configuration.- Throws:
NullPointerException- if one of the constructor parameters are null.
-
-
Method Details
-
jvmOptions
Get the jvm options which should get applied to the service command line. JVM options are there to configure the behaviour of the jvm, for example the garbage collector.- Returns:
- the jvm options to set for services created based on this configuration.
-
processParameters
Get the process parameters which should get appended to the command line. Process parameters are there to configure the application, for example setting an option like --online-mode=true.- Returns:
- the process parameters to set for services created based on this configuration.
-
environmentVariables
Get the environment variables which should get appended to all environments of services which are created based on this configuration.- Returns:
- the environment variables to set for services created based on this configuration.
-
inclusions
Get all includes which should be added initially to services created based on this configuration. These inclusions are downloaded and included either when explicitly requested or before starting the service.- Returns:
- all inclusions which should get added initially to services created based on this configuration.
-
templates
Get all templates that should get copied onto services created based on this configuration when preparing. Templates of configured groups and groups targeting the environment of this configuration will be included automatically.NOTE: the returned set is not yet sorted, sorting will be made when actually including the templates. The sorting changes will not reflect into this configuration.
- Returns:
- all templates to include when preparing a service based on this configuration.
-
deployments
Get all deployments that should be added initially to services created based on this configuration. These deployments will not get executed directly, you need to execute them for each service individually using the service provider.- Returns:
- all deployments which should get added initially when preparing a service.
-
propertyHolder
Get the underlying document that all read and write operations are delegated to.- Specified by:
propertyHolderin interfaceDocPropertyHolder- Returns:
- the underlying document.
-