public < S extends Service > S getService ( Class < S > type ) { for ( final Service serv : this . serviceManager . servicesByState ( ) . values ( ) ) { if ( serv . isRunning ( ) && type . isInstance ( serv ) ) { return type . cast ( serv ) ; } } return null ; }
Replies a kernel service that is alive .