ReqT - The type of the request.public abstract class AbstractAuthenticatingServerCallListener<ReqT> extends 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.
ForwardingServerCallListener.SimpleForwardingServerCallListener<ReqT>| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAuthenticatingServerCallListener(ServerCall.Listener<ReqT> delegate,
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 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() |
delegateprotected AbstractAuthenticatingServerCallListener(ServerCall.Listener<ReqT> delegate, Context context)
delegate - The listener to delegate to.context - The context to attach.protected final 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 ForwardingServerCallListener<ReqT>public void onHalfClose()
onHalfClose in class ForwardingServerCallListener.SimpleForwardingServerCallListener<ReqT>public void onCancel()
onCancel in class ForwardingServerCallListener.SimpleForwardingServerCallListener<ReqT>public void onComplete()
onComplete in class ForwardingServerCallListener.SimpleForwardingServerCallListener<ReqT>public void onReady()
onReady in class ForwardingServerCallListener.SimpleForwardingServerCallListener<ReqT>