Top Description Fields Constructors Methods
io.rsocket.transport.netty.client

public final Class TcpClientTransport

extends Object
implements ClientTransport
Class Inheritance
All Implemented Interfaces
io.rsocket.transport.ClientTransport, io.rsocket.transport.Transport
Static Imports
io.rsocket.frame.FrameLengthCodec.FRAME_LENGTH_MASK

An implementation of ClientTransport that connects to a ServerTransport via TCP.

Field Summary

Modifier and TypeField and Description
private final TcpClient
private final int

Constructor Summary

AccessConstructor and Description
private
TcpClientTransport(TcpClient client, int maxFrameLength)

Method Summary

Modifier and TypeMethod and Description
public Mono<DuplexConnection>
connect()

Implements io.rsocket.transport.ClientTransport.connect.

Return a Mono that connects for each subscriber.
public static TcpClientTransport

Returns:

a new instance
create
(int
the port to connect to
port
)

Creates a new instance connecting to localhost

public static TcpClientTransport

Returns:

a new instance
create
(String
the address to connect to
bindAddress
,
int
the port to connect to
port
)

Creates a new instance

public static TcpClientTransport

Returns:

a new instance
create
(InetSocketAddress
the address to connect to
address
)

Creates a new instance

public static TcpClientTransport

Returns:

a new instance
create
(TcpClient
the TcpClient to use
client
)

Creates a new instance

public static TcpClientTransport

Returns:

a new instance
create
(TcpClient
the TcpClient to use
client
,
int
max frame length being sent over the connection
maxFrameLength
)

Creates a new instance

public int
maxFrameLength()

Overrides default io.rsocket.transport.Transport.maxFrameLength.

Configurations that exposes the maximum frame size that a DuplexConnection can bring up to RSocket level.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clientback to summary
private final TcpClient client
maxFrameLengthback to summary
private final int maxFrameLength

Constructor Detail

TcpClientTransportback to summary
private TcpClientTransport(TcpClient client, int maxFrameLength)

Method Detail

connectback to summary
public Mono<DuplexConnection> connect()

Implements io.rsocket.transport.ClientTransport.connect.

Doc from io.rsocket.transport.ClientTransport.connect.

Return a Mono that connects for each subscriber.

Annotations
@Override
createback to summary
public static TcpClientTransport create(int port)

Creates a new instance connecting to localhost

Parameters
port:int

the port to connect to

Returns:TcpClientTransport

a new instance

createback to summary
public static TcpClientTransport create(String bindAddress, int port)

Creates a new instance

Parameters
bindAddress:String

the address to connect to

port:int

the port to connect to

Returns:TcpClientTransport

a new instance

Exceptions
NullPointerException:
if bindAddress is null
createback to summary
public static TcpClientTransport create(InetSocketAddress address)

Creates a new instance

Parameters
address:InetSocketAddress

the address to connect to

Returns:TcpClientTransport

a new instance

Exceptions
NullPointerException:
if address is null
createback to summary
public static TcpClientTransport create(TcpClient client)

Creates a new instance

Parameters
client:TcpClient

the TcpClient to use

Returns:TcpClientTransport

a new instance

Exceptions
NullPointerException:
if client is null
createback to summary
public static TcpClientTransport create(TcpClient client, int maxFrameLength)

Creates a new instance

Parameters
client:TcpClient

the TcpClient to use

maxFrameLength:int

max frame length being sent over the connection

Returns:TcpClientTransport

a new instance

Exceptions
NullPointerException:
if client is null
maxFrameLengthback to summary
public int maxFrameLength()

Overrides default io.rsocket.transport.Transport.maxFrameLength.

Doc from io.rsocket.transport.Transport.maxFrameLength.

Configurations that exposes the maximum frame size that a DuplexConnection can bring up to RSocket level.

This number should not exist the 16,777,215 (maximum frame size specified by RSocket spec)

Returns:int

return maximum configured frame size limit

Annotations
@Override