Class ProcessService
java.lang.Object
de.bytestore.hostinger.process.service.ProcessService
-
Constructor Summary
ConstructorsConstructorDescriptionProcessService(WebhookService webhookService, io.jmix.core.UnconstrainedDataManager unconstrainedDataManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidattach(Process processIO, ProcessConsole listenerIO) Attaches a Process Console to a process by invoking the attach method for all Process Listeners.intcount()Retrieves the count of Process objects in the database.voidCreates a new process by executing the create method for all Process Listeners.voidExecutes a command for a process by invoking the execute method for all Process Listeners.booleanThis method checks if the given entity exists in the database.Retrieves the configuration for the specified provider.list()Return all ExtensionPoints for Process API.Retrieves the logback configuration for a process by invoking the logback method for all Process Listeners.voidRemoves the given process by executing the remove method for all Process Listeners.voidStarts the given process by executing the start method for all Process Listeners.Returns the statistics of a process by invoking the stats method for all Process Listeners.Retrieves the status of the given process by executing the status method for all Process Listeners.voidStops the given process by executing the stop method for all Process Listeners.Retrieves the volume for the specified Volumes object.voidwebhooks()Registers event types with the WebhookHandler class.
-
Constructor Details
-
ProcessService
public ProcessService(WebhookService webhookService, io.jmix.core.UnconstrainedDataManager unconstrainedDataManager)
-
-
Method Details
-
webhooks
public void webhooks()Registers event types with the WebhookHandler class. The event types are registered for the specified class and listener. -
list
Return all ExtensionPoints for Process API.- Returns:
-
start
Starts the given process by executing the start method for all Process Listeners.- Parameters:
processIO- the process to start- Throws:
Exception
-
stop
Stops the given process by executing the stop method for all Process Listeners.- Parameters:
processIO- the process to stop- Throws:
Exception
-
status
Retrieves the status of the given process by executing the status method for all Process Listeners.- Parameters:
processIO- the process for which to retrieve the status- Returns:
- the status of the process
- Throws:
Exception
-
create
Creates a new process by executing the create method for all Process Listeners.- Parameters:
processIO- the process to be created
-
execute
Executes a command for a process by invoking the execute method for all Process Listeners.- Parameters:
processIO- the process for which the command is to be executedcommandIO- the command to be executed for the process
-
attach
Attaches a Process Console to a process by invoking the attach method for all Process Listeners.- Parameters:
processIO- the process to which the console is to be attachedlistenerIO- the ProcessConsole to be attached to the process
-
stats
Returns the statistics of a process by invoking the stats method for all Process Listeners.- Parameters:
processIO- the process for which the statistics are to be retrieved- Returns:
- the ProcessStats object containing the statistics of the process
-
logback
Retrieves the logback configuration for a process by invoking the logback method for all Process Listeners.- Parameters:
processIO- the process for which the logback configuration is to be retrieved- Returns:
- the logback configuration as a string
-
exitsInDb
This method checks if the given entity exists in the database.- Parameters:
manager- The data manager for accessing the database.entity- The entity to check for existence in the database.- Returns:
- true if the entity exists in the database, false otherwise.
-
volume
Retrieves the volume for the specified Volumes object.- Parameters:
volumeIO- the Volumes object for which to retrieve the volume- Returns:
- the File representing the volume
-
remove
Removes the given process by executing the remove method for all Process Listeners.- Parameters:
processIO- the process to remove
-
getConfig
Retrieves the configuration for the specified provider.- Parameters:
providerIO- the provider for which to retrieve the configuration- Returns:
- the configuration for the specified provider
-
count
public int count()Retrieves the count of Process objects in the database.- Returns:
- the count of Process objects
-