Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public WeightedStats apply(RSocket rSocket) {
void init(RSocketConnector connector) {
connector.interceptors(
registry ->
registry.forRequester(
registry.forRequestsInRequester(
(Function<RSocket, ? extends RequestInterceptor>)
rSocket -> {
final WeightedStatsRequestInterceptor interceptor =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ public class InitializingInterceptorRegistry extends InterceptorRegistry {

@Nullable
public RequestInterceptor initRequesterRequestInterceptor(RSocket rSocketRequester) {
return CompositeRequestInterceptor.create(rSocketRequester, getRequesterRequestInterceptors());
return CompositeRequestInterceptor.create(
rSocketRequester, getRequestInterceptorsForRequester());
}

@Nullable
public RequestInterceptor initResponderRequestInterceptor(RSocket rSocketResponder) {
return CompositeRequestInterceptor.create(rSocketResponder, getResponderRequestInterceptors());
return CompositeRequestInterceptor.create(
rSocketResponder, getRequestInterceptorsForResponder());
}

public DuplexConnection initConnection(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class InterceptorRegistry {
* RequestInterceptor}
* @since 1.1
*/
public InterceptorRegistry forRequester(
public InterceptorRegistry forRequestsInRequester(
Function<RSocket, ? extends RequestInterceptor> interceptor) {
requesterRequestInterceptors.add(interceptor);
return this;
Expand All @@ -61,7 +61,7 @@ public InterceptorRegistry forRequester(
* RequestInterceptor}
* @since 1.1
*/
public InterceptorRegistry forResponder(
public InterceptorRegistry forRequestsInResponder(
Function<RSocket, ? extends RequestInterceptor> interceptor) {
responderRequestInterceptors.add(interceptor);
return this;
Expand Down Expand Up @@ -134,11 +134,11 @@ public InterceptorRegistry forConnection(Consumer<List<DuplexConnectionIntercept
return this;
}

List<Function<RSocket, ? extends RequestInterceptor>> getRequesterRequestInterceptors() {
List<Function<RSocket, ? extends RequestInterceptor>> getRequestInterceptorsForRequester() {
return requesterRequestInterceptors;
}

List<Function<RSocket, ? extends RequestInterceptor>> getResponderRequestInterceptors() {
List<Function<RSocket, ? extends RequestInterceptor>> getRequestInterceptorsForResponder() {
return responderRequestInterceptors;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public Flux<Payload> requestChannel(Publisher<Payload> payloads) {
RSocketConnector.create()
.interceptors(
ir ->
ir.forRequester(
ir.forRequestsInRequester(
(Function<RSocket, ? extends RequestInterceptor>)
(__) -> testRequestInterceptor))
.connect(LocalClientTransport.create("test"))
Expand Down Expand Up @@ -206,7 +206,7 @@ public Flux<Payload> requestChannel(Publisher<Payload> payloads) {
}))
.interceptors(
ir ->
ir.forResponder(
ir.forRequestsInResponder(
(Function<RSocket, ? extends RequestInterceptor>)
(__) -> testRequestInterceptor))
.connect(LocalClientTransport.create("test"))
Expand Down Expand Up @@ -292,7 +292,7 @@ public Flux<Payload> requestChannel(Publisher<Payload> payloads) {
}))
.interceptors(
ir ->
ir.forResponder(
ir.forRequestsInResponder(
(Function<RSocket, ? extends RequestInterceptor>)
(__) -> testRequestInterceptor))
.bindNow(LocalServerTransport.create("test"));
Expand Down Expand Up @@ -400,7 +400,7 @@ void interceptorShouldBeInstalledProperlyOnTheServerResponderSide(boolean errorO
}))
.interceptors(
ir ->
ir.forRequester(
ir.forRequestsInRequester(
(Function<RSocket, ? extends RequestInterceptor>)
(__) -> testRequestInterceptor))
.bindNow(LocalServerTransport.create("test"));
Expand Down Expand Up @@ -543,7 +543,7 @@ public void dispose() {}
RSocketConnector.create()
.interceptors(
ir ->
ir.forRequester(
ir.forRequestsInRequester(
(Function<RSocket, ? extends RequestInterceptor>)
(__) -> testRequestInterceptor))
.connect(LocalClientTransport.create("test"))
Expand Down Expand Up @@ -646,13 +646,13 @@ public void dispose() {}
RSocketConnector.create()
.interceptors(
ir ->
ir.forRequester(
ir.forRequestsInRequester(
(Function<RSocket, ? extends RequestInterceptor>)
(__) -> testRequestInterceptor)
.forRequester(
.forRequestsInRequester(
(Function<RSocket, ? extends RequestInterceptor>)
(__) -> testRequestInterceptor1)
.forRequester(
.forRequestsInRequester(
(Function<RSocket, ? extends RequestInterceptor>)
(__) -> testRequestInterceptor2))
.connect(LocalClientTransport.create("test"))
Expand Down