コード例 #1
0
 @Override
 public Future<Void> exposeManagementMetadata(
     @ClientId Object clientDescriptor,
     ContextContainer contextContainer,
     Capability... capabilities) {
   Utils.getClientIdentifier(consumer, clientDescriptor)
       .ifPresent(
           clientIdentifier -> {
             producer.addNode(
                 array("management", "clients", clientIdentifier.getClientId(), "registry"),
                 "contextContainer",
                 contextContainer);
             producer.addNode(
                 array("management", "clients", clientIdentifier.getClientId(), "registry"),
                 "capabilities",
                 capabilities);
           });
   return CompletableFuture.completedFuture(null);
 }
コード例 #2
0
 @Override
 public Future<Void> exposeTags(@ClientId Object clientDescriptor, String... tags) {
   Utils.getClientIdentifier(consumer, clientDescriptor)
       .ifPresent(
           clientIdentifier ->
               producer.addNode(
                   array("management", "clients", clientIdentifier.getClientId()),
                   "tags",
                   tags == null ? new String[0] : tags));
   return CompletableFuture.completedFuture(null);
 }