private Object getServiceHandler ( IScope scope , String serviceName ) { // get application scope handler first Object service = scope . getHandler ( ) ; if ( serviceName == null || serviceName . equals ( "" ) ) { // no service requested, return application scope handler log . trace ( "No service requested, return application scope handler: {}" , service ) ; return service ; } // search service resolver that knows about service name for ( IServiceResolver resolver : serviceResolvers ) { service = resolver . resolveService ( scope , serviceName ) ; if ( service != null ) { return service ; } } // requested service does not exist return null ; }
Lookup a handler for the passed service name in the given scope .