Lookup a handler for the passed service name in the given scope.

@param scope
Scope
@param serviceName
Service name
@return Service handler
773506
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;
    }
123345
public Observable<Page<RoleAssignmentInner>> listForScopeAsync(final String scope) {
        return listForScopeWithServiceResponseAsync(scope)
            .map(new Func1<ServiceResponse<Page<RoleAssignmentInner>>, Page<RoleAssignmentInner>>() {
                @Override
                public Page<RoleAssignmentInner> call(ServiceResponse<Page<RoleAssignmentInner>> response) {
                    return response.body();
                }
            });
    }
294266
public void getService(String serviceName, final GetServiceCallback cb, Object context){
        ProtocolHeader header = new ProtocolHeader();
        header.setType(ProtocolType.GetService);

        GetServiceProtocol p = new GetServiceProtocol(serviceName);
        p.setWatcher(false);

        ProtocolCallback pcb = new ProtocolCallback(){

            @Override
            public void call(boolean result, Response response,
                    ErrorCode error, Object ctx) {
                ModelService rsp = null;
                if(response != null){
                    rsp = ((GetServiceResponse) response).getService();
                }
                cb.call(result, rsp, error, ctx);
            }

        };

        connection.submitCallbackRequest(header, p,  pcb, context);
    }
684822
public static gslbservice_binding get(nitro_service service, String servicename) throws Exception{
		gslbservice_binding obj = new gslbservice_binding();
		obj.set_servicename(servicename);
		gslbservice_binding response = (gslbservice_binding) obj.get_resource(service);
		return response;
	}
792389
public static sslservice_binding get(nitro_service service, String servicename) throws Exception{
		sslservice_binding obj = new sslservice_binding();
		obj.set_servicename(servicename);
		sslservice_binding response = (sslservice_binding) obj.get_resource(service);
		return response;
	}
606938
public static <T> ServiceController<T> findService(ServiceRegistry registry, ServiceName name) {
        return (ServiceController<T>) registry.getService(name);
    }
743310
public ArrayList<OvhIpCountriesEnum> serviceName_orderableIpCountries_GET(String serviceName) throws IOException {
		String qPath = "/dedicatedCloud/{serviceName}/orderableIpCountries";
		StringBuilder sb = path(qPath, serviceName);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, t4);
	}
88473
function (methodName) {
            var parameters = this.smd.parameters || [];

            parameters = parameters.concat(this.smd.services[methodName].parameters || []);

            return parameters;
        }
1013202
public ArrayList<OvhStack> project_serviceName_stack_GET(String serviceName) throws IOException {
		String qPath = "/cloud/project/{serviceName}/stack";
		StringBuilder sb = path(qPath, serviceName);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, t15);
	}
96480
private OperationHandler getHandler(String serviceName, String operationName) {
        if (serviceName == null) {
            if (logger.isDebugEnabled()) {
                logger.debug("Service Name was null!");
            }

            return null;
        }

        if (operationName == null) {
            if (logger.isDebugEnabled()) {
                logger.debug("Operation Name was null!");
            }

            return null;
        }

        Map<String, OperationHandler> handlers =
                m_serviceHandlers.get(serviceName);
        if (handlers == null) {
            if (logger.isDebugEnabled()) {
                logger.debug("No Service Handlers found for: " + serviceName);
            }

            return null;
        }

        OperationHandler handler = handlers.get(operationName);
        if (handler == null) {
            if (logger.isDebugEnabled()) {
                logger.debug("Handler not found for: " + serviceName + "/"
                        + operationName);
            }
        }

        return handler;
    }
1033466
public ServiceRRLoadBalancer getServiceRRLoadBalancer(String serviceName) {
        for (ServiceRRLoadBalancer lb : svcLBList) {
            if (lb.getServiceName().equals(serviceName)) {
                return lb;
            }
        }
        ServiceRRLoadBalancer lb = new ServiceRRLoadBalancer(lookupService,
                serviceName);
        svcLBList.add(lb);
        return lb;
    }
1295438
public ModelService getService(String serviceName, Watcher watcher){
        WatcherRegistration wcb = null;
        if (watcher != null) {
            wcb = new WatcherRegistration(serviceName, watcher);
        }

        ProtocolHeader header = new ProtocolHeader();
        header.setType(ProtocolType.GetService);

        GetServiceProtocol p = new GetServiceProtocol(serviceName);
        p.setWatcher(watcher != null);
        GetServiceResponse resp ;
        resp = (GetServiceResponse) connection.submitRequest(header, p,  wcb);
        return resp.getService();
    }
1327250
public static ServiceAccount of(String email, List<String> scopes) {
    return new ServiceAccount(email, scopes);
  }
269361
public static final synchronized BPMTaskService getTaskService(QName serviceDomainName, QName serviceName) {
        KnowledgeRuntimeManager runtimeManager = KnowledgeRuntimeManagerRegistry.getRuntimeManager(serviceDomainName, serviceName);
        if (runtimeManager != null) {
            RuntimeEngine runtimeEngine = runtimeManager.getRuntimeEngine();
            if (runtimeEngine != null) {
                final TaskService taskService = runtimeEngine.getTaskService();
                if (taskService != null) {
                    InvocationHandler ih = new InvocationHandler() {
                        @Override
                        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
                            return method.invoke(taskService, args);
                        }
                    };
                    return (BPMTaskService)Proxy.newProxyInstance(BPMTaskService.class.getClassLoader(), new Class[] {BPMTaskService.class}, ih);
                }
            }
        }
        return null;
    }
1005942
public static HttpServiceTracker getServiceTracker(BundleContext context, String key, String value)
    {
        String filter = "(" + key + "=" + value + ")";
        try {
            ServiceReference[] references = context.getServiceReferences(ServiceTracker.class.getName(), filter);
            if ((references == null) || (references.length == 0))
                references = context.getServiceReferences(ServiceTracker.class.getName(), null);   // Being paranoid
            if (references != null) {
                for (ServiceReference reference : references)
                {
                    Object service = context.getService(reference);
                    if (service instanceof HttpServiceTracker)    // Always
                        if (value.equals(((HttpServiceTracker)service).getProperty(key)))   // Being paranoid
                            return (HttpServiceTracker)service;
                }
            }
        } catch (InvalidSyntaxException e) {
            e.printStackTrace();
        }
        return null;    // Not found
    }
634811
@Override
    public void getScope(final String scopeName, final SecurityContext securityContext,
                         final AsyncResponse asyncResponse) {
        long traceId = LoggerHelpers.traceEnter(log, "getScope");

        try {
            restAuthHelper.authenticateAuthorize(
                    getAuthorizationHeader(),
                    AuthResourceRepresentation.ofScope(scopeName), READ);
        } catch (AuthException e) {
            log.warn("Get scope for {} failed due to authentication failure.", scopeName);
            asyncResponse.resume(Response.status(Status.fromStatusCode(e.getResponseCode())).build());
            LoggerHelpers.traceLeave(log, "getScope", traceId);
            return;
        }

        controllerService.getScope(scopeName)
                .thenApply(scope -> {
                        return Response.status(Status.OK).entity(new ScopeProperty().scopeName(scope)).build();
                })
                .exceptionally( exception -> {
                    if (exception.getCause() instanceof StoreException.DataNotFoundException) {
                        log.warn("Scope: {} not found", scopeName);
                        return Response.status(Status.NOT_FOUND).build();
                    } else {
                        log.warn("getScope for {} failed with exception: {}", scopeName, exception);
                        return Response.status(Status.INTERNAL_SERVER_ERROR).build();
                    }
                }).thenApply(asyncResponse::resume)
                .thenAccept(x -> LoggerHelpers.traceLeave(log, "getScope", traceId));
    }
276281
protected static Object getScopeService(IScope scope, String name) {
        return getScopeService(scope, name, null);
    }