private CompletableFuture < MetadataResponse > metadata ( MetadataRequest request ) { return CompletableFuture . completedFuture ( MetadataResponse . ok ( services . entrySet ( ) . stream ( ) . filter ( entry -> Futures . get ( entry . getValue ( ) ) . serviceType ( ) . name ( ) . equals ( request . primitiveType ( ) ) ) . map ( entry -> entry . getKey ( ) ) . collect ( Collectors . toSet ( ) ) ) ) ; }
Handles a metadata request .