mirror of https://github.com/grpc/grpc-java.git
core: Explicitly mention MCB.intercept's execution order
New users are much more likely to use MCB to add an interceptor instead of ClientInterceptors, so may not be aware of the interesting execution order.
This commit is contained in:
parent
ab5257504b
commit
033cf21118
|
@ -104,7 +104,9 @@ public abstract class ManagedChannelBuilder<T extends ManagedChannelBuilder<T>>
|
|||
/**
|
||||
* Adds interceptors that will be called before the channel performs its real work. This is
|
||||
* functionally equivalent to using {@link ClientInterceptors#intercept(Channel, List)}, but while
|
||||
* still having access to the original {@code ManagedChannel}.
|
||||
* still having access to the original {@code ManagedChannel}. Interceptors run in the reverse
|
||||
* order in which they are added, just as with consecutive calls to {@code
|
||||
* ClientInterceptors.intercept()}.
|
||||
*
|
||||
* @return this
|
||||
* @since 1.0.0
|
||||
|
@ -115,6 +117,8 @@ public abstract class ManagedChannelBuilder<T extends ManagedChannelBuilder<T>>
|
|||
* Adds interceptors that will be called before the channel performs its real work. This is
|
||||
* functionally equivalent to using {@link ClientInterceptors#intercept(Channel,
|
||||
* ClientInterceptor...)}, but while still having access to the original {@code ManagedChannel}.
|
||||
* Interceptors run in the reverse order in which they are added, just as with consecutive calls
|
||||
* to {@code ClientInterceptors.intercept()}.
|
||||
*
|
||||
* @return this
|
||||
* @since 1.0.0
|
||||
|
|
|
@ -94,7 +94,8 @@ public abstract class ServerBuilder<T extends ServerBuilder<T>> {
|
|||
/**
|
||||
* Adds a {@link ServerInterceptor} that is run for all services on the server. Interceptors
|
||||
* added through this method always run before per-service interceptors added through {@link
|
||||
* ServerInterceptors}. Interceptors run in the reverse order in which they are added.
|
||||
* ServerInterceptors}. Interceptors run in the reverse order in which they are added, just as
|
||||
* with consecutive calls to {@code ServerInterceptors.intercept()}.
|
||||
*
|
||||
* @param interceptor the all-service interceptor
|
||||
* @return this
|
||||
|
|
Loading…
Reference in New Issue