Returns the complete list of services managed by this
service manager. This list is thread safe following the
public void start()
Starts this service manager and all services that it contains.
Any services added after the service manager has started will have
their start() methods called.
public boolean isStarted()
Returns true if this service manager has been started.
public void stop()
Stops all services and puts the service manager into a stopped state.
public <S extends Service<T>> void addService(S s)
Adds the specified service and initializes it. If the service manager
has already been started then the service will also be started.
public <S extends Service<T>> void removeService(S s)
Removes the specified service from this service manager, stopping
and terminating it as required. If this service manager is in a
started state then the service will be stopped. After removal,
the service will be terminated.
public void terminate()
Terminates all services. If the service manager has not been
stopped yet, then it will be stopped.
public <S extends Service<T>> S getService(java.lang.Class<S> type)
Retrieves the first service of the specified type.