File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
chapter-5/chapter-5-quarkus-vertx-eventbus/src/main/java/org/acme Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 11package org .acme ;
22
3- import io .smallrye .mutiny .Uni ;
4- import io .vertx .mutiny .core .eventbus .EventBus ;
5- import io .vertx .mutiny .core .eventbus .Message ;
6-
73import javax .ws .rs .GET ;
84import javax .ws .rs .Path ;
95import javax .ws .rs .PathParam ;
106import javax .ws .rs .Produces ;
117import javax .ws .rs .core .MediaType ;
128
9+ import io .smallrye .mutiny .Uni ;
10+ import io .vertx .mutiny .core .eventbus .EventBus ;
11+ import io .vertx .mutiny .core .eventbus .Message ;
12+
1313@ Path ("/async" )
1414public class GreetingResource {
1515
@@ -23,16 +23,16 @@ public GreetingResource(EventBus bus) {
2323 @ Produces (MediaType .TEXT_PLAIN )
2424 @ Path ("{name}" )
2525 public Uni <String > greeting (@ PathParam ("name" ) String name ) {
26- return bus .<String >request ("greeting" , name )
27- . onItem (). transform (Message ::body );
26+ return this . bus .<String >request ("greeting" , name )
27+ . map (Message ::body );
2828 }
2929
3030 @ GET
3131 @ Produces (MediaType .TEXT_PLAIN )
3232 @ Path ("block/{message}" )
3333 public Uni <String > blockingConsumer (String message ) {
34- return bus .<String >request ("blocking-consumer" , message )
35- .onItem (). transform (Message ::body );
34+ return this . bus .<String >request ("blocking-consumer" , message )
35+ .map (Message ::body );
3636 }
3737
38- }
38+ }
You can’t perform that action at this time.
0 commit comments