Host Services Service

The HostServicesService class is useful to manage all the BrownieHostService database operations

Author

N7ghtm4r3 - Tecknobit

See also

EquinoxEventsCollector

Constructors

Link copied to clipboard
@Autowired
constructor(servicesRepository: HostServicesRepository, hostEventsService: HostEventsService, configurationsService: ServicesConfigurationsService, serviceEvents: HostServiceEventsService)
Constructor used to init the service

Properties

Link copied to clipboard
configurationsService the support service used to manage the service configurations data
Link copied to clipboard
hostEventsService the support service used to manage the host events data
Link copied to clipboard
serviceEvents the support service used to manage the service events data
Link copied to clipboard
eventsRepository instance used to access to the SERVICES_KEY table

Functions

Link copied to clipboard
open fun editService(serviceId: String, serviceName: String, servicePath: String, programArguments: String, purgeNohupOutAfterReboot: Boolean, autoRunAfterHostReboot: Boolean)
Method used to edit an existing service
Link copied to clipboard
open fun getServices(hostId: String, keywords: Set<String>, statuses: List<String>, page: Int, pageSize: Int): PaginatedResponse<BrownieHostService>
Method used to get the list of the services related to a host
Link copied to clipboard
Method used to get the current status of the specified services
Link copied to clipboard
private open fun markServiceAsStopped(host: BrownieHost, servicePid: Long)
Method used to mark a service as STOPPED
Link copied to clipboard
Link copied to clipboard
open fun rebootService(host: BrownieHost, service: BrownieHostService)
Method used to reboot a service
Link copied to clipboard
open fun removeService(host: BrownieHost, service: BrownieHostService, removeFromTheHost: Boolean)
Method used to remove a service
Link copied to clipboard
open fun setServiceAsStopped(serviceId: String)
Method used to set the STOPPED status to the specified service
Link copied to clipboard
open fun setServiceInRebooting(serviceId: String)
Method used to set the REBOOTING status to the specified service
Link copied to clipboard
open fun startService(host: BrownieHost, service: BrownieHostService)
open fun startService(host: BrownieHost, service: BrownieHostService, hostRebooted: Boolean)
Method used to start a service
Link copied to clipboard
open fun stopService(host: BrownieHost, service: BrownieHostService)
Method used to stop a service
Link copied to clipboard
open fun storeService(serviceName: String, servicePath: String, hostId: String, programArguments: String, purgeNohupOutAfterReboot: Boolean, autoRunAfterHostReboot: Boolean)
Method used to store a new service