DuplexConnection that connects via a Websocket.
rsocket-java strongly assumes that each ByteBuf is encoded with the length. This is not true for message oriented transports so this must be specifically dropped from Frames sent and stitched back on for frames received.
| Modifier and Type | Field and Description |
|---|---|
| private final Connection | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | WebsocketDuplexConnection(Connection
the connection)Connection to for managing the serverCreates a new instance |
| public | WebsocketDuplexConnection(String side, Connection
the connection)Connection to for managing the serverCreates a new instance |
| Modifier and Type | Method and Description |
|---|---|
| public ByteBufAllocator | |
| protected void | |
| public Mono | onClose()
Overrides io. Implements io. Mono that terminates when the instance is terminated by any reason.
|
| public Flux | receive()
Implements io. Frames received on this connection.
|
| public SocketAddress | remoteAddress()
Implements io. |
| public void | sendErrorAndClose(RSocketErrorException
to encode in the error frame e)Implements io. |
| public String |
| connection | back to summary |
|---|---|
| private final Connection connection | |
| side | back to summary |
|---|---|
| private final String side | |
| WebsocketDuplexConnection | back to summary |
|---|---|
| public WebsocketDuplexConnection(Connection connection) Creates a new instance
| |
| WebsocketDuplexConnection | back to summary |
|---|---|
| public WebsocketDuplexConnection(String side, Connection connection) Creates a new instance
| |
| alloc | back to summary |
|---|---|
| public ByteBufAllocator alloc() Implements io. Doc from io. Returns the assigned
| |
| doOnClose | back to summary |
|---|---|
| protected void doOnClose() Implements abstract io.
| |
| onClose | back to summary |
|---|---|
| public Mono Overrides io. Implements io. Doc from io. Returns a | |
| receive | back to summary |
|---|---|
| public Flux Implements io. Doc from io. Returns a stream of all Completion Returned Error Returned Multiple Subscriptions Returned | |
| remoteAddress | back to summary |
|---|---|
| public SocketAddress remoteAddress() Implements io. Doc from io. Return the remote address that this connection is connected to. The returned
| |
| sendErrorAndClose | back to summary |
|---|---|
| public void sendErrorAndClose(RSocketErrorException e) Implements io. Doc from io. Send an error frame and after it is successfully sent, close the connection.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |