public class ClientServerInputMultiplexer extends Object implements Closeable
DuplexConnection.receive()
is a single stream on which the following type of frames
arrive:
The only way to differentiate these two frames is determining whether the stream Id is odd or even. Even IDs are for the streams initiated by server and odds are for streams initiated by the client.
Disposable.Composite, Disposable.Swap
Constructor and Description |
---|
ClientServerInputMultiplexer(DuplexConnection source) |
ClientServerInputMultiplexer(DuplexConnection source,
InitializingInterceptorRegistry registry,
boolean isClient) |
Modifier and Type | Method and Description |
---|---|
DuplexConnection |
asClientConnection() |
DuplexConnection |
asClientServerConnection() |
DuplexConnection |
asServerConnection() |
DuplexConnection |
asSetupConnection() |
void |
dispose() |
boolean |
isDisposed() |
Mono<Void> |
onClose()
Returns a
Mono that terminates when the instance is terminated by any reason. |
public ClientServerInputMultiplexer(DuplexConnection source)
public ClientServerInputMultiplexer(DuplexConnection source, InitializingInterceptorRegistry registry, boolean isClient)
public DuplexConnection asClientServerConnection()
public DuplexConnection asServerConnection()
public DuplexConnection asClientConnection()
public DuplexConnection asSetupConnection()
public void dispose()
dispose
in interface Disposable
public boolean isDisposed()
isDisposed
in interface Disposable
public Mono<Void> onClose()
Closeable
Mono
that terminates when the instance is terminated by any reason. Note, in
case of error termination, the cause of error will be propagated as an error signal through
Subscriber.onError(Throwable)
. Otherwise, Subscriber.onComplete()
will be called.