Top Inners Fields Constructors Methods
io.rsocket.plugins

pack-priv Class CompositeRequestInterceptor

extends Object
implements RequestInterceptor
Class Inheritance
All Implemented Interfaces
io.rsocket.plugins.RequestInterceptor, reactor.core.Disposable
Imports
io.netty.buffer.ByteBuf, io.rsocket.frame.FrameType, java.util.List, reactor.core.publisher.Operators, reactor.util.annotation.Nullable, reactor.util.context.Context

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final RequestInterceptor[]

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static RequestInterceptor
public void
dispose()

Implements reactor.core.Disposable.dispose.

Cancel or dispose the underlying task or resource.
public void
onCancel(int
used by this request
streamId
,
FrameType requestType)

Implements io.rsocket.plugins.RequestInterceptor.onCancel.

Method which is being invoked once a successfully accepted request is cancelled.
public void
onReject(Throwable
exception which causes rejection of a particular request
rejectionReason
,
FrameType requestType, ByteBuf
taken from the initial frame
metadata
)

Implements io.rsocket.plugins.RequestInterceptor.onReject.

Method which is being invoked on the request rejection.
public void
onStart(int
used for the request
streamId
,
FrameType requestType, ByteBuf
taken from the initial frame
metadata
)

Implements io.rsocket.plugins.RequestInterceptor.onStart.

Method which is being invoked on successful acceptance and start of a request.
public void
onTerminate(int
used by this request
streamId
,
FrameType requestType, Throwable
with which this finished has terminated. Must be one of the following signals
cause
)

Implements io.rsocket.plugins.RequestInterceptor.onTerminate.

Method which is being invoked once a successfully accepted request is terminated.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

requestInterceptorsback to summary
pack-priv final RequestInterceptor[] requestInterceptors

Constructor Detail

CompositeRequestInterceptorback to summary
pack-priv CompositeRequestInterceptor(RequestInterceptor[] requestInterceptors)

Method Detail

createback to summary
pack-priv static RequestInterceptor create(List<RequestInterceptor> interceptors)
Annotations
@Nullable
disposeback to summary
public void dispose()

Implements reactor.core.Disposable.dispose.

Doc from reactor.core.Disposable.dispose.

Cancel or dispose the underlying task or resource.

Implementations are required to make this method idempotent.

Annotations
@Override
onCancelback to summary
public void onCancel(int streamId, FrameType requestType)

Implements io.rsocket.plugins.RequestInterceptor.onCancel.

Doc from io.rsocket.plugins.RequestInterceptor.onCancel.

Method which is being invoked once a successfully accepted request is cancelled. This method can be invoked only after the onStart(int, FrameType, ByteBuf) method. This method is exclusive with onTerminate(int, FrameType, Throwable).

Parameters
streamId:int

used by this request

requestType:FrameType

of the request. Must be one of the following types FrameType#REQUEST_FNF, FrameType#REQUEST_RESPONSE, FrameType#REQUEST_STREAM or FrameType#REQUEST_CHANNEL

Annotations
@Override
onRejectback to summary
public void onReject(Throwable rejectionReason, FrameType requestType, ByteBuf metadata)

Implements io.rsocket.plugins.RequestInterceptor.onReject.

Doc from io.rsocket.plugins.RequestInterceptor.onReject.

Method which is being invoked on the request rejection. This method is being called only if the actual request can not be started and is called instead of the onStart(int, FrameType, ByteBuf) method. The reason for rejection can be one of the following:

  • No available io.rsocket.lease.Lease on the requester or the responder sides
  • Invalid io.rsocket.Payload size or format on the Requester side, so the request is being rejected before the actual streamId is generated
  • A second subscription on the ongoing Request
Parameters
rejectionReason:Throwable

exception which causes rejection of a particular request

requestType:FrameType

of the request. Must be one of the following types FrameType#REQUEST_FNF, FrameType#REQUEST_RESPONSE, FrameType#REQUEST_STREAM or FrameType#REQUEST_CHANNEL

metadata:ByteBuf

taken from the initial frame

Annotations
@Override
onStartback to summary
public void onStart(int streamId, FrameType requestType, ByteBuf metadata)

Implements io.rsocket.plugins.RequestInterceptor.onStart.

Doc from io.rsocket.plugins.RequestInterceptor.onStart.

Method which is being invoked on successful acceptance and start of a request.

Parameters
streamId:int

used for the request

requestType:FrameType

of the request. Must be one of the following types FrameType#REQUEST_FNF, FrameType#REQUEST_RESPONSE, FrameType#REQUEST_STREAM or FrameType#REQUEST_CHANNEL

metadata:ByteBuf

taken from the initial frame

Annotations
@Override
onTerminateback to summary
public void onTerminate(int streamId, FrameType requestType, Throwable cause)

Implements io.rsocket.plugins.RequestInterceptor.onTerminate.

Doc from io.rsocket.plugins.RequestInterceptor.onTerminate.

Method which is being invoked once a successfully accepted request is terminated. This method can be invoked only after the onStart(int, FrameType, ByteBuf) method. This method is exclusive with onCancel(int, FrameType).

Parameters
streamId:int

used by this request

requestType:FrameType

of the request. Must be one of the following types FrameType#REQUEST_FNF, FrameType#REQUEST_RESPONSE, FrameType#REQUEST_STREAM or FrameType#REQUEST_CHANNEL

cause:Throwable

with which this finished has terminated. Must be one of the following signals

Annotations
@Override
io.rsocket.plugins back to summary

pack-priv Class CompositeRequestInterceptor.SafeRequestInterceptor

extends Object
implements RequestInterceptor
Class Inheritance
  • java.lang.Object
  • io.rsocket.plugins.CompositeRequestInterceptor.SafeRequestInterceptor
All Implemented Interfaces
io.rsocket.plugins.RequestInterceptor, reactor.core.Disposable

Field Summary

Modifier and TypeField and Description
pack-priv final RequestInterceptor

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Implements reactor.core.Disposable.dispose.

Cancel or dispose the underlying task or resource.
public boolean
isDisposed()

Overrides default reactor.core.Disposable.isDisposed.

Optionally return true when the resource or task is disposed.
public void
onCancel(int
used by this request
streamId
,
FrameType requestType)

Implements io.rsocket.plugins.RequestInterceptor.onCancel.

Method which is being invoked once a successfully accepted request is cancelled.
public void
onReject(Throwable
exception which causes rejection of a particular request
rejectionReason
,
FrameType requestType, ByteBuf
taken from the initial frame
metadata
)

Implements io.rsocket.plugins.RequestInterceptor.onReject.

Method which is being invoked on the request rejection.
public void
onStart(int
used for the request
streamId
,
FrameType requestType, ByteBuf
taken from the initial frame
metadata
)

Implements io.rsocket.plugins.RequestInterceptor.onStart.

Method which is being invoked on successful acceptance and start of a request.
public void
onTerminate(int
used by this request
streamId
,
FrameType requestType, Throwable
with which this finished has terminated. Must be one of the following signals
cause
)

Implements io.rsocket.plugins.RequestInterceptor.onTerminate.

Method which is being invoked once a successfully accepted request is terminated.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

requestInterceptorback to summary
pack-priv final RequestInterceptor requestInterceptor

Constructor Detail

SafeRequestInterceptorback to summary
public SafeRequestInterceptor(RequestInterceptor requestInterceptor)

Method Detail

disposeback to summary
public void dispose()

Implements reactor.core.Disposable.dispose.

Doc from reactor.core.Disposable.dispose.

Cancel or dispose the underlying task or resource.

Implementations are required to make this method idempotent.

Annotations
@Override
isDisposedback to summary
public boolean isDisposed()

Overrides default reactor.core.Disposable.isDisposed.

Doc from reactor.core.Disposable.isDisposed.

Optionally return true when the resource or task is disposed.

Implementations are not required to track disposition and as such may never return true even when disposed. However, they MUST only return true when there's a guarantee the resource or task is disposed.

Returns:boolean

true when there's a guarantee the resource or task is disposed.

Annotations
@Override
onCancelback to summary
public void onCancel(int streamId, FrameType requestType)

Implements io.rsocket.plugins.RequestInterceptor.onCancel.

Doc from io.rsocket.plugins.RequestInterceptor.onCancel.

Method which is being invoked once a successfully accepted request is cancelled. This method can be invoked only after the onStart(int, FrameType, ByteBuf) method. This method is exclusive with onTerminate(int, FrameType, Throwable).

Parameters
streamId:int

used by this request

requestType:FrameType

of the request. Must be one of the following types FrameType#REQUEST_FNF, FrameType#REQUEST_RESPONSE, FrameType#REQUEST_STREAM or FrameType#REQUEST_CHANNEL

Annotations
@Override
onRejectback to summary
public void onReject(Throwable rejectionReason, FrameType requestType, ByteBuf metadata)

Implements io.rsocket.plugins.RequestInterceptor.onReject.

Doc from io.rsocket.plugins.RequestInterceptor.onReject.

Method which is being invoked on the request rejection. This method is being called only if the actual request can not be started and is called instead of the onStart(int, FrameType, ByteBuf) method. The reason for rejection can be one of the following:

  • No available io.rsocket.lease.Lease on the requester or the responder sides
  • Invalid io.rsocket.Payload size or format on the Requester side, so the request is being rejected before the actual streamId is generated
  • A second subscription on the ongoing Request
Parameters
rejectionReason:Throwable

exception which causes rejection of a particular request

requestType:FrameType

of the request. Must be one of the following types FrameType#REQUEST_FNF, FrameType#REQUEST_RESPONSE, FrameType#REQUEST_STREAM or FrameType#REQUEST_CHANNEL

metadata:ByteBuf

taken from the initial frame

Annotations
@Override
onStartback to summary
public void onStart(int streamId, FrameType requestType, ByteBuf metadata)

Implements io.rsocket.plugins.RequestInterceptor.onStart.

Doc from io.rsocket.plugins.RequestInterceptor.onStart.

Method which is being invoked on successful acceptance and start of a request.

Parameters
streamId:int

used for the request

requestType:FrameType

of the request. Must be one of the following types FrameType#REQUEST_FNF, FrameType#REQUEST_RESPONSE, FrameType#REQUEST_STREAM or FrameType#REQUEST_CHANNEL

metadata:ByteBuf

taken from the initial frame

Annotations
@Override
onTerminateback to summary
public void onTerminate(int streamId, FrameType requestType, Throwable cause)

Implements io.rsocket.plugins.RequestInterceptor.onTerminate.

Doc from io.rsocket.plugins.RequestInterceptor.onTerminate.

Method which is being invoked once a successfully accepted request is terminated. This method can be invoked only after the onStart(int, FrameType, ByteBuf) method. This method is exclusive with onCancel(int, FrameType).

Parameters
streamId:int

used by this request

requestType:FrameType

of the request. Must be one of the following types FrameType#REQUEST_FNF, FrameType#REQUEST_RESPONSE, FrameType#REQUEST_STREAM or FrameType#REQUEST_CHANNEL

cause:Throwable

with which this finished has terminated. Must be one of the following signals

Annotations
@Override