File tree 4 files changed +12
-18
lines changed
grpc-plain-text-quickstart/src/main/java/io/quarkus/grpc/examples/hello
grpc-tls-quickstart/src/main/java/io/quarkus/grpc/examples/hello
4 files changed +12
-18
lines changed Original file line number Diff line number Diff line change 1
1
package io .quarkus .grpc .examples .hello ;
2
2
3
- import javax .inject .Inject ;
4
3
import javax .ws .rs .GET ;
5
4
import javax .ws .rs .Path ;
6
5
import javax .ws .rs .PathParam ;
9
8
import examples .HelloReply ;
10
9
import examples .HelloRequest ;
11
10
import examples .MutinyGreeterGrpc ;
12
- import io .quarkus .grpc .runtime . annotations . GrpcService ;
11
+ import io .quarkus .grpc .GrpcClient ;
13
12
import io .smallrye .mutiny .Uni ;
14
13
15
14
@ Path ("/hello" )
16
15
public class HelloWorldEndpoint {
17
16
18
- @ Inject
19
- @ GrpcService ("hello" )
17
+ @ GrpcClient ("hello" )
20
18
GreeterGrpc .GreeterBlockingStub blockingHelloService ;
21
- @ Inject
22
- @ GrpcService ("hello" )
19
+
20
+ @ GrpcClient ("hello" )
23
21
MutinyGreeterGrpc .MutinyGreeterStub mutinyHelloService ;
24
22
25
23
@ GET
Original file line number Diff line number Diff line change 2
2
3
3
import java .util .concurrent .atomic .AtomicInteger ;
4
4
5
- import javax .inject .Singleton ;
6
-
7
5
import examples .HelloReply ;
8
6
import examples .HelloRequest ;
9
7
import examples .MutinyGreeterGrpc ;
8
+ import io .quarkus .grpc .GrpcService ;
10
9
import io .smallrye .mutiny .Uni ;
11
10
12
- @ Singleton
11
+ @ GrpcService
13
12
public class HelloWorldService extends MutinyGreeterGrpc .GreeterImplBase {
14
13
15
14
AtomicInteger counter = new AtomicInteger ();
Original file line number Diff line number Diff line change 1
1
package io .quarkus .grpc .examples .hello ;
2
2
3
- import javax .inject .Inject ;
4
3
import javax .ws .rs .GET ;
5
4
import javax .ws .rs .Path ;
6
5
import javax .ws .rs .PathParam ;
9
8
import examples .HelloReply ;
10
9
import examples .HelloRequest ;
11
10
import examples .MutinyGreeterGrpc ;
12
- import io .quarkus .grpc .runtime . annotations . GrpcService ;
11
+ import io .quarkus .grpc .GrpcClient ;
13
12
import io .smallrye .mutiny .Uni ;
14
13
15
14
@ Path ("/hello" )
16
15
public class HelloWorldTlsEndpoint {
17
16
18
- @ Inject
19
- @ GrpcService ("hello" )
17
+ @ GrpcClient ("hello" )
20
18
GreeterGrpc .GreeterBlockingStub blockingHelloService ;
21
- @ Inject
22
- @ GrpcService ("hello" )
19
+
20
+ @ GrpcClient ("hello" )
23
21
MutinyGreeterGrpc .MutinyGreeterStub mutinyHelloService ;
24
22
25
23
@ GET
Original file line number Diff line number Diff line change 1
1
package io .quarkus .grpc .examples .hello ;
2
2
3
- import javax .inject .Singleton ;
4
-
5
3
import examples .HelloReply ;
6
4
import examples .HelloRequest ;
7
5
import examples .MutinyGreeterGrpc ;
6
+ import io .quarkus .grpc .GrpcService ;
8
7
import io .smallrye .mutiny .Uni ;
9
8
10
- @ Singleton
9
+ @ GrpcService
11
10
public class HelloWorldTlsService extends MutinyGreeterGrpc .GreeterImplBase {
12
11
13
12
@ Override
You can’t perform that action at this time.
0 commit comments