Skip to content

Commit 04adafb

Browse files
refactor: allow wrapping interceptors around service def (#40)
1 parent 1ebd6f3 commit 04adafb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

grpc-server-utils/src/main/java/org/hypertrace/core/grpcutils/server/InterceptorUtil.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,12 @@ public static ServerServiceDefinition wrapInterceptors(BindableService bindableS
1717
return ServerInterceptors.intercept(
1818
bindableService, new RequestContextServerInterceptor(), new ThrowableResponseInterceptor());
1919
}
20+
21+
public static ServerServiceDefinition wrapInterceptors(
22+
ServerServiceDefinition serviceDefinition) {
23+
return ServerInterceptors.intercept(
24+
serviceDefinition,
25+
new RequestContextServerInterceptor(),
26+
new ThrowableResponseInterceptor());
27+
}
2028
}

0 commit comments

Comments
 (0)