Class ServiceConfiguration
- java.lang.Object
-
- de.dytanic.cloudnet.common.document.gson.BasicJsonDocPropertyable
-
- de.dytanic.cloudnet.driver.serialization.json.SerializableJsonDocPropertyable
-
- de.dytanic.cloudnet.driver.service.ServiceConfiguration
-
- All Implemented Interfaces:
de.dytanic.cloudnet.common.document.gson.IJsonDocPropertyable,SerializableObject
public class ServiceConfiguration extends SerializableJsonDocPropertyable implements SerializableObject
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classServiceConfiguration.BuilderBuilder for the creation of new services.
-
Field Summary
Fields Modifier and Type Field Description protected booleanautoDeleteOnStopprotected java.lang.String[]deletedFilesAfterStopprotected ServiceDeployment[]deploymentsprotected java.lang.String[]groupsprotected ServiceRemoteInclusion[]includesprotected java.lang.StringjavaCommandprotected intportprotected ProcessConfigurationprocessConfigprotected java.lang.Stringruntimeprotected ServiceIdserviceIdprotected booleanstaticServiceprotected ServiceTemplate[]templates
-
Constructor Summary
Constructors Constructor Description ServiceConfiguration()ServiceConfiguration(ServiceId serviceId, java.lang.String runtime, boolean autoDeleteOnStop, boolean staticService, java.lang.String[] groups, ServiceRemoteInclusion[] includes, ServiceTemplate[] templates, ServiceDeployment[] deployments, ProcessConfiguration processConfig, int port)ServiceConfiguration(ServiceId serviceId, java.lang.String runtime, boolean autoDeleteOnStop, boolean staticService, java.lang.String[] groups, ServiceRemoteInclusion[] includes, ServiceTemplate[] templates, ServiceDeployment[] deployments, ProcessConfiguration processConfig, de.dytanic.cloudnet.common.document.gson.JsonDocument properties, int port)ServiceConfiguration(ServiceId serviceId, java.lang.String runtime, boolean autoDeleteOnStop, boolean staticService, java.lang.String[] groups, ServiceRemoteInclusion[] includes, ServiceTemplate[] templates, ServiceDeployment[] deployments, ProcessConfiguration processConfig, de.dytanic.cloudnet.common.document.gson.JsonDocument properties, int port, java.lang.String javaCommand)ServiceConfiguration(ServiceId serviceId, java.lang.String runtime, boolean autoDeleteOnStop, boolean staticService, java.lang.String[] groups, ServiceRemoteInclusion[] includes, ServiceTemplate[] templates, ServiceDeployment[] deployments, java.lang.String[] deletedFilesAfterStop, ProcessConfiguration processConfig, int port)ServiceConfiguration(ServiceId serviceId, java.lang.String runtime, boolean autoDeleteOnStop, boolean staticService, java.lang.String[] groups, ServiceRemoteInclusion[] includes, ServiceTemplate[] templates, ServiceDeployment[] deployments, java.lang.String[] deletedFilesAfterStop, ProcessConfiguration processConfig, int port, java.lang.String javaCommand)ServiceConfiguration(ServiceId serviceId, java.lang.String runtime, boolean autoDeleteOnStop, boolean staticService, java.lang.String[] groups, ServiceRemoteInclusion[] includes, ServiceTemplate[] templates, ServiceDeployment[] deployments, java.lang.String[] deletedFilesAfterStop, ProcessConfiguration processConfig, de.dytanic.cloudnet.common.document.gson.JsonDocument properties, int port)ServiceConfiguration(ServiceId serviceId, java.lang.String runtime, boolean autoDeleteOnStop, boolean staticService, java.lang.String[] groups, ServiceRemoteInclusion[] includes, ServiceTemplate[] templates, ServiceDeployment[] deployments, java.lang.String[] deletedFilesAfterStop, ProcessConfiguration processConfig, de.dytanic.cloudnet.common.document.gson.JsonDocument properties, int port, java.lang.String javaCommand)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static @NotNull ServiceConfiguration.Builderbuilder()static @NotNull ServiceConfiguration.Builderbuilder(@NotNull ServiceTask task)@Nullable ServiceInfoSnapshotcreateNewService()@NotNull de.dytanic.cloudnet.common.concurrent.ITask<ServiceInfoSnapshot>createNewServiceAsync()@NotNull java.lang.String[]getDeletedFilesAfterStop()@NotNull ServiceDeployment[]getDeployments()@NotNull java.lang.String[]getGroups()@NotNull ServiceRemoteInclusion[]getIncludes()ServiceDeployment[]getInitDeployments()ServiceRemoteInclusion[]getInitIncludes()ServiceTemplate[]getInitTemplates()@Nullable java.lang.StringgetJavaCommand()intgetPort()@NotNull ProcessConfigurationgetProcessConfig()@NotNull java.lang.StringgetRuntime()@NotNull ServiceIdgetServiceId()@NotNull ServiceTemplate[]getTemplates()booleanhasGroup(@NotNull java.lang.String group)booleanisAutoDeleteOnStop()booleanisStaticService()voidread(@NotNull ProtocolBuffer buffer)voidsetAutoDeleteOnStop(boolean autoDeleteOnStop)voidsetDeletedFilesAfterStop(@NotNull java.lang.String[] deletedFilesAfterStop)voidsetDeployments(@NotNull ServiceDeployment[] deployments)voidsetGroups(@NotNull java.lang.String[] groups)voidsetIncludes(@NotNull ServiceRemoteInclusion[] includes)voidsetInitDeployments(ServiceDeployment[] initDeployments)voidsetInitIncludes(ServiceRemoteInclusion[] initIncludes)voidsetInitTemplates(ServiceTemplate[] initTemplates)voidsetJavaCommand(java.lang.String javaCommand)voidsetPort(int port)voidsetProcessConfig(@NotNull ProcessConfiguration processConfig)voidsetRuntime(@NotNull java.lang.String runtime)voidsetServiceId(@NotNull ServiceId serviceId)voidsetStaticService(boolean staticService)voidsetTemplates(@NotNull ServiceTemplate[] templates)voidwrite(@NotNull ProtocolBuffer buffer)
-
-
-
Field Detail
-
serviceId
protected ServiceId serviceId
-
runtime
protected java.lang.String runtime
-
javaCommand
protected java.lang.String javaCommand
-
autoDeleteOnStop
protected boolean autoDeleteOnStop
-
staticService
protected boolean staticService
-
groups
protected java.lang.String[] groups
-
includes
protected ServiceRemoteInclusion[] includes
-
templates
protected ServiceTemplate[] templates
-
deployments
protected ServiceDeployment[] deployments
-
deletedFilesAfterStop
protected java.lang.String[] deletedFilesAfterStop
-
processConfig
protected ProcessConfiguration processConfig
-
port
protected int port
-
-
Constructor Detail
-
ServiceConfiguration
public ServiceConfiguration(ServiceId serviceId, java.lang.String runtime, boolean autoDeleteOnStop, boolean staticService, java.lang.String[] groups, ServiceRemoteInclusion[] includes, ServiceTemplate[] templates, ServiceDeployment[] deployments, ProcessConfiguration processConfig, int port)
-
ServiceConfiguration
public ServiceConfiguration(ServiceId serviceId, java.lang.String runtime, boolean autoDeleteOnStop, boolean staticService, java.lang.String[] groups, ServiceRemoteInclusion[] includes, ServiceTemplate[] templates, ServiceDeployment[] deployments, java.lang.String[] deletedFilesAfterStop, ProcessConfiguration processConfig, int port)
-
ServiceConfiguration
public ServiceConfiguration(ServiceId serviceId, java.lang.String runtime, boolean autoDeleteOnStop, boolean staticService, java.lang.String[] groups, ServiceRemoteInclusion[] includes, ServiceTemplate[] templates, ServiceDeployment[] deployments, java.lang.String[] deletedFilesAfterStop, ProcessConfiguration processConfig, int port, java.lang.String javaCommand)
-
ServiceConfiguration
public ServiceConfiguration(ServiceId serviceId, java.lang.String runtime, boolean autoDeleteOnStop, boolean staticService, java.lang.String[] groups, ServiceRemoteInclusion[] includes, ServiceTemplate[] templates, ServiceDeployment[] deployments, ProcessConfiguration processConfig, de.dytanic.cloudnet.common.document.gson.JsonDocument properties, int port)
-
ServiceConfiguration
public ServiceConfiguration(ServiceId serviceId, java.lang.String runtime, boolean autoDeleteOnStop, boolean staticService, java.lang.String[] groups, ServiceRemoteInclusion[] includes, ServiceTemplate[] templates, ServiceDeployment[] deployments, ProcessConfiguration processConfig, de.dytanic.cloudnet.common.document.gson.JsonDocument properties, int port, java.lang.String javaCommand)
-
ServiceConfiguration
public ServiceConfiguration(ServiceId serviceId, java.lang.String runtime, boolean autoDeleteOnStop, boolean staticService, java.lang.String[] groups, ServiceRemoteInclusion[] includes, ServiceTemplate[] templates, ServiceDeployment[] deployments, java.lang.String[] deletedFilesAfterStop, ProcessConfiguration processConfig, de.dytanic.cloudnet.common.document.gson.JsonDocument properties, int port)
-
ServiceConfiguration
public ServiceConfiguration(ServiceId serviceId, java.lang.String runtime, boolean autoDeleteOnStop, boolean staticService, java.lang.String[] groups, ServiceRemoteInclusion[] includes, ServiceTemplate[] templates, ServiceDeployment[] deployments, java.lang.String[] deletedFilesAfterStop, ProcessConfiguration processConfig, de.dytanic.cloudnet.common.document.gson.JsonDocument properties, int port, java.lang.String javaCommand)
-
ServiceConfiguration
public ServiceConfiguration()
-
-
Method Detail
-
builder
@NotNull public static @NotNull ServiceConfiguration.Builder builder()
-
builder
@NotNull public static @NotNull ServiceConfiguration.Builder builder(@NotNull @NotNull ServiceTask task)
-
getServiceId
@NotNull public @NotNull ServiceId getServiceId()
-
setServiceId
public void setServiceId(@NotNull @NotNull ServiceId serviceId)
-
isAutoDeleteOnStop
public boolean isAutoDeleteOnStop()
-
setAutoDeleteOnStop
public void setAutoDeleteOnStop(boolean autoDeleteOnStop)
-
isStaticService
public boolean isStaticService()
-
setStaticService
public void setStaticService(boolean staticService)
-
getJavaCommand
@Nullable public @Nullable java.lang.String getJavaCommand()
-
setJavaCommand
public void setJavaCommand(java.lang.String javaCommand)
-
getRuntime
@NotNull public @NotNull java.lang.String getRuntime()
-
setRuntime
public void setRuntime(@NotNull @NotNull java.lang.String runtime)
-
getGroups
@NotNull public @NotNull java.lang.String[] getGroups()
-
setGroups
public void setGroups(@NotNull @NotNull java.lang.String[] groups)
-
hasGroup
public boolean hasGroup(@NotNull @NotNull java.lang.String group)
-
getIncludes
@NotNull public @NotNull ServiceRemoteInclusion[] getIncludes()
-
setIncludes
public void setIncludes(@NotNull @NotNull ServiceRemoteInclusion[] includes)
-
getTemplates
@NotNull public @NotNull ServiceTemplate[] getTemplates()
-
setTemplates
public void setTemplates(@NotNull @NotNull ServiceTemplate[] templates)
-
getDeployments
@NotNull public @NotNull ServiceDeployment[] getDeployments()
-
setDeployments
public void setDeployments(@NotNull @NotNull ServiceDeployment[] deployments)
-
getDeletedFilesAfterStop
@NotNull public @NotNull java.lang.String[] getDeletedFilesAfterStop()
-
setDeletedFilesAfterStop
public void setDeletedFilesAfterStop(@NotNull @NotNull java.lang.String[] deletedFilesAfterStop)
-
getPort
public int getPort()
-
setPort
public void setPort(int port)
-
getInitDeployments
public ServiceDeployment[] getInitDeployments()
-
setInitDeployments
public void setInitDeployments(ServiceDeployment[] initDeployments)
-
getInitIncludes
public ServiceRemoteInclusion[] getInitIncludes()
-
setInitIncludes
public void setInitIncludes(ServiceRemoteInclusion[] initIncludes)
-
getInitTemplates
public ServiceTemplate[] getInitTemplates()
-
setInitTemplates
public void setInitTemplates(ServiceTemplate[] initTemplates)
-
createNewService
@Nullable public @Nullable ServiceInfoSnapshot createNewService()
-
createNewServiceAsync
@NotNull public @NotNull de.dytanic.cloudnet.common.concurrent.ITask<ServiceInfoSnapshot> createNewServiceAsync()
-
write
public void write(@NotNull @NotNull ProtocolBuffer buffer)- Specified by:
writein interfaceSerializableObject- Overrides:
writein classSerializableJsonDocPropertyable
-
read
public void read(@NotNull @NotNull ProtocolBuffer buffer)- Specified by:
readin interfaceSerializableObject- Overrides:
readin classSerializableJsonDocPropertyable
-
getProcessConfig
@NotNull public @NotNull ProcessConfiguration getProcessConfig()
-
setProcessConfig
public void setProcessConfig(@NotNull @NotNull ProcessConfiguration processConfig)
-
-