Lookup a Service by serviceName.

@param serviceName
the service name.
@return
the ModelService.
488287
public ModelService lookupService(String serviceName){
        HttpResponse result = invoker.invoke("/service/" + serviceName , null, HttpMethod.GET);

        if (result.getHttpCode() != HTTP_OK) {
            throw new ServiceException(ErrorCode.REMOTE_DIRECTORY_SERVER_ERROR,
                    "HTTP Code is not OK, code=%s", result.getHttpCode());
        }

        ModelService service = _deserialize(result.getRetBody(), ModelService.class);
        return service;
    }
273215
@Override
  @Nullable
  public ServerMethodDefinition<?, ?> lookupMethod(String methodName, @Nullable String authority) {
    String serviceName = MethodDescriptor.extractFullServiceName(methodName);
    if (serviceName == null) {
      return null;
    }
    ServerServiceDefinition service = services.get(serviceName);
    if (service == null) {
      return null;
    }
    return service.getMethod(methodName);
  }
1343368
public long getLastChangedTimeMills(String serviceName) {
        ModelService service = null;
        try {
            service=lookupService(serviceName);
        }catch (ServiceException e){
            LOGGER.debug(String.format("Exception when lookup service by name=[%s], error=[%s]",serviceName,e.getMessage()));
        }
        return service == null ? -1L : service.getModifiedTime().getTime();
    }
1083950
def get_service(self, name):
    
    return services.get_service(self._get_resource_root(), name, self.name)
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);
    }
319867
def lookup_service(service)
      code, message, uri = @proxy.lookupService(@caller_id, service)
      if code == 1
        uri
      else
        false
      end
    end
372153
public static String getServiceName(String hostname) throws IOException {
    int i = hostname.lastIndexOf(".");
    if (i <= 0) {
      throw badHostName(hostname);
    }
    String service = hostname.substring(i + 1);
    if (service.isEmpty() || service.contains(".")) {
      throw badHostName(hostname);
    }
    return service;
  }
800367
def get_service_by_name(self, service_name):
		""""""
		content = self._fetch("/service/search?name=%s" % service_name)
		return FastlyService(self, content)
376033
public <T> T getService(String serviceName) {
    T service = findService(serviceName, true);
    if (service == null) {
      throw new IllegalArgumentException(format("No service found named \"%s\"", serviceName));
    }

    return service;
  }
285649
public function get($serviceName) {
        $container = $this->serviceData[$serviceName] ?? NULL;
        if($container) {
            return $container->getInstance();
        }

        if(in_array($serviceName, $this->getSelfReferenceNames()))
            return $this;

        $e = new UnknownServiceException("Service $serviceName is not registered", E_USER_ERROR);
        $e->setServiceName($serviceName);
        throw $e;
    }
67232
public function getService($serviceName)
    {
        $serviceName = $this->getServiceName($serviceName);

        return $this->getApp()->container->get($serviceName);
    }
1165262
@Override
    public ModelService getModelService(String serviceName){
        ModelService service = null;
        if (getCache().isCached(serviceName)) {
            service = getCache().getService(serviceName);
        } else {
            service= this.getDirectoryServiceClient().getService(serviceName, watcher);
            if(service != null){
                getCache().putService(serviceName, service);
            }
        }
        return service;
    }
1106854
public static svcbindings get(nitro_service service, String servicename) throws Exception{
		svcbindings obj = new svcbindings();
		obj.set_servicename(servicename);
		svcbindings response = (svcbindings) obj.get_resource(service);
		return response;
	}
1074044
protected Class<?>[] getHandlerInterfaces(final String serviceName) {
		if (remoteInterface != null) {
			return new Class<?>[]{remoteInterface};
		} else if (Proxy.isProxyClass(handler.getClass())) {
			return handler.getClass().getInterfaces();
		} else {
			return new Class<?>[]{handler.getClass()};
		}
	}
779261
public ModelMetadataKey getMetadataKey(String keyName){
        HttpResponse result = invoker.invoke("/metadatakey/" + keyName , null, HttpMethod.GET);

        if (result.getHttpCode() != HTTP_OK) {
           throw new ServiceException(ErrorCode.REMOTE_DIRECTORY_SERVER_ERROR,
                    "HTTP Code is not OK, code=%s", result.getHttpCode());
        }

        ModelMetadataKey key = _deserialize(
                    result.getRetBody(), ModelMetadataKey.class);

        return key;
    }
657877
public ModelService getModelService(String serviceName){
        ModelService service = getDirectoryServiceClient().getService(serviceName, null);
        return service;
    }
734196
public <S> S getServiceValue(ServiceType type, String localName) {
    String globalName = composeLocalName(type, localName);
    ObjectName serviceName = getObjectName(globalName);
    return getServiceValue(serviceName);
  }