Package net.devh.boot.grpc.server.scope
Class GrpcRequestScope
java.lang.Object
net.devh.boot.grpc.server.scope.GrpcRequestScope
- All Implemented Interfaces:
Context.CancellationListener
,ServerInterceptor
,BeanFactoryPostProcessor
,Scope
@GrpcGlobalServerInterceptor
@Order(-2147483648)
public class GrpcRequestScope
extends Object
implements Scope, BeanFactoryPostProcessor, ServerInterceptor, Context.CancellationListener
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
get
(String name, ObjectFactory<?> objectFactory) <ReqT,
RespT>
ServerCall.Listener<ReqT>interceptCall
(ServerCall<ReqT, RespT> call, Metadata headers, ServerCallHandler<ReqT, RespT> next) void
void
registerDestructionCallback
(String name, Runnable callback)
-
Field Details
-
GRPC_REQUEST_SCOPE_NAME
- See Also:
-
-
Constructor Details
-
GrpcRequestScope
public GrpcRequestScope()
-
-
Method Details
-
postProcessBeanFactory
- Specified by:
postProcessBeanFactory
in interfaceBeanFactoryPostProcessor
- Throws:
BeansException
-
interceptCall
public <ReqT,RespT> ServerCall.Listener<ReqT> interceptCall(ServerCall<ReqT, RespT> call, Metadata headers, ServerCallHandler<ReqT, RespT> next) - Specified by:
interceptCall
in interfaceServerInterceptor
-
get
-
remove
-
registerDestructionCallback
- Specified by:
registerDestructionCallback
in interfaceScope
-
resolveContextualObject
- Specified by:
resolveContextualObject
in interfaceScope
-
getConversationId
- Specified by:
getConversationId
in interfaceScope
-
cancelled
- Specified by:
cancelled
in interfaceContext.CancellationListener
-