code: @Override
    public ServiceRefAmp ref()
    {
      if (_isForeign) {
        return null;
      }
  
      if (workers() > 1) {
        return buildWorkers();
      }
      
      if (_worker != null) {
        return buildWorker();
      }
      else {
        //throw new IllegalStateException(L.l("build() requires a worker or resource."));
        return buildService();
      }
    }
docs: Build the service and return the service ref.