* @throws IllegalStateException if any of the Services are not {@link State#NEW new} when the
* method is called.
*/
public ServiceManager startAsync() {
for (Service service : services) {
State state = service.state();
checkState(state == NEW, "Service %s is %s, cannot start it.", service, state);
}
for (Service service : services) {
try {
state.tryStartTiming(service);
service.startAsync();
} catch (IllegalStateException e) {
// This can happen if the service has already been started or stopped (e.g. by another
// service or listener). Our contract says it is safe to call this method if
// all services were NEW when it was called, and this has already been verified above, so we