@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); }
@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); }
@Override public Future<ClientIdentifier> getClientIdentifier(@ClientId Object clientDescriptor) { return CompletableFuture.completedFuture( Utils.getClientIdentifier(consumer, clientDescriptor).get()); }