code: @Override
      public Future<Void> registerProvider(final String domain,
                                           Object provider,
                                           ProviderQos providerQos,
                                           boolean awaitGlobalRegistration) {
          if (providerQos == null) {
              throw new JoynrRuntimeException("providerQos == null. It must not be null");
          }
          ProviderContainer providerContainer = providerContainerFactory.create(provider);
          String participantId = participantIdStorage.getProviderParticipantId(domain,
                                                                               providerContainer.getInterfaceName(),
                                                                               providerContainer.getMajorVersion());
          String defaultPublicKeyId = "";
          DiscoveryEntry discoveryEntry = new DiscoveryEntry(getVersionFromAnnotation(provider.getClass()),
                                                             domain,
                                                             providerContainer.getInterfaceName(),
                                                             participantId,
                                                             providerQos,
                                                             System.currentTimeMillis(),
                                                             System.currentTimeMillis() + defaultExpiryTimeMs,
                                                             defaultPublicKeyId);
          final boolean isGloballyVisible = (discoveryEntry.getQos().getScope() == ProviderScope.GLOBAL);
          messageRouter.addNextHop(participantId, libjoynrMessagingAddress, isGloballyVisible);
          providerDirectory.add(participantId, providerContainer);
  
          Callback<Void> callback = new Callback<Void>() {
              @Override
              public void onSuccess(@CheckForNull Void result) {
  
              }
  
              @Override
              public void onFailure(JoynrRuntimeException runtimeException) {
                  logger.error("Unexpected Error while registering Provider:", runtimeException);
  
              }
          };
          return localDiscoveryAggregator.add(callback, discoveryEntry, awaitGlobalRegistration);
      }
docs: /*
  (non-Javadoc)
  
  @see io.joynr.capabilities.CapabilitiesRegistrar# registerProvider(java.lang.String,
  io.joynr.provider.JoynrProvider, java.lang.Class, boolean)