@groovy.transform.CompileStatic class ServiceGroup extends java.lang.Object
Service which is a group of services. Starting starts all, stopping stops all.
| Constructor and description |
|---|
ServiceGroup
(java.lang.String id)Constructor. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
add(Service service)Add given service to the group of services. |
|
java.lang.String |
getId() |
|
java.util.List<Service> |
getServices()Get the list of services. |
|
ServiceState |
getState()Get service state of the group. |
|
void |
start()Start all services in the group. |
|
void |
stop()Stop all services in a group. |
|
void |
zap() |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Constructor.
id - the service group idAdd given service to the group of services.
Get the list of services. Use also to modify the group of services.
Get service state of the group.
Start all services in the group. Runtime exceptions are not caught, hence if the first service throws while starting up, no attempt is made to start the others.
Stop all services in a group. Runtime exceptions are only logged, hence it is always attempted to stop all services.