ReqT - The type of the request.public abstract class AbstractAuthenticatingServerCallListener<ReqT>
extends io.grpc.ForwardingServerCallListener.SimpleForwardingServerCallListener<ReqT>
Note: If you only want to setup the grpc-context and nothing else, then you can use
Contexts.interceptCall(Context, ServerCall, Metadata, ServerCallHandler) instead.
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAuthenticatingServerCallListener(io.grpc.ServerCall.Listener<ReqT> delegate,
io.grpc.Context context)
Creates a new AbstractAuthenticatingServerCallListener which will attach the given security context before
delegating to the given listener.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
attachAuthenticationContext()
Attaches the authentication context before the actual call.
|
protected io.grpc.Context |
context()
Gets the
Context associated with the call. |
protected abstract void |
detachAuthenticationContext()
Detaches the authentication context after the actual call.
|
void |
onCancel() |
void |
onComplete() |
void |
onHalfClose() |
void |
onMessage(ReqT message) |
void |
onReady() |
protected AbstractAuthenticatingServerCallListener(io.grpc.ServerCall.Listener<ReqT> delegate, io.grpc.Context context)
delegate - The listener to delegate to.context - The context to attach.protected final io.grpc.Context context()
Context associated with the call.protected abstract void attachAuthenticationContext()
This method is called after the grpc context is attached.
protected abstract void detachAuthenticationContext()
This method is called before the grpc context is detached.
public void onMessage(ReqT message)
onMessage in class io.grpc.ForwardingServerCallListener<ReqT>public void onHalfClose()
onHalfClose in class io.grpc.ForwardingServerCallListener.SimpleForwardingServerCallListener<ReqT>public void onCancel()
onCancel in class io.grpc.ForwardingServerCallListener.SimpleForwardingServerCallListener<ReqT>public void onComplete()
onComplete in class io.grpc.ForwardingServerCallListener.SimpleForwardingServerCallListener<ReqT>public void onReady()
onReady in class io.grpc.ForwardingServerCallListener.SimpleForwardingServerCallListener<ReqT>