-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35876 from alesj/i35634
More hierarchical classes are not picked up as global interceptors
- Loading branch information
Showing
4 changed files
with
54 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...rceptors/src/main/java/io/quarkus/grpc/examples/interceptors/PriorityImplInterceptor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package io.quarkus.grpc.examples.interceptors; | ||
|
||
import jakarta.enterprise.context.ApplicationScoped; | ||
|
||
import io.grpc.Metadata; | ||
import io.grpc.ServerCall; | ||
import io.grpc.ServerCallHandler; | ||
import io.quarkus.grpc.GlobalInterceptor; | ||
|
||
@ApplicationScoped | ||
@GlobalInterceptor | ||
public class PriorityImplInterceptor implements PriorityInterceptor { | ||
@Override | ||
public <ReqT, RespT> ServerCall.Listener<ReqT> interceptCall(ServerCall<ReqT, RespT> call, Metadata headers, | ||
ServerCallHandler<ReqT, RespT> next) { | ||
HelloWorldEndpoint.invoked.add(getClass().getName()); | ||
return next.startCall(call, headers); | ||
} | ||
|
||
@Override | ||
public int getPriority() { | ||
return 0; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...interceptors/src/main/java/io/quarkus/grpc/examples/interceptors/PriorityInterceptor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package io.quarkus.grpc.examples.interceptors; | ||
|
||
import jakarta.enterprise.inject.spi.Prioritized; | ||
|
||
import io.grpc.ServerInterceptor; | ||
|
||
public interface PriorityInterceptor extends ServerInterceptor, Prioritized { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters