/** * 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 addService( S s ) { if( log.isLoggable(Level.FINE) ) { log.log(Level.FINE, "addService({0})", s); } services.add(s); if( log.isLoggable(Level.FINE) ) { log.log(Level.FINE, "Initializing service:{0}", s); } s.initialize(getParent()); if( started ) { if( log.isLoggable(Level.FINE) ) { log.log(Level.FINE, "Starting service:{0}", s); } s.start(); } }
/** * 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 addService( S s ) { if( log.isLoggable(Level.FINE) ) { log.log(Level.FINE, "addService({0})", s); } services.add(s); if( log.isLoggable(Level.FINE) ) { log.log(Level.FINE, "Initializing service:{0}", s); } s.initialize(getParent()); if( started ) { if( log.isLoggable(Level.FINE) ) { log.log(Level.FINE, "Starting service:{0}", s); } s.start(); } }