public class LoadbalanceTarget extends Object
LoadbalanceRSocketClient that
in turn maintains and peridodically updates a list of current load-balance targets. The getKey() is used to identify a target uniquely while the transport is
used to connect to the target server.LoadbalanceRSocketClient.create(RSocketConnector, Publisher)| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
static LoadbalanceTarget |
from(String key,
ClientTransport transport)
Create a new
LoadbalanceTarget with the given key and ClientTransport. |
String |
getKey()
Return the key that identifies this target uniquely.
|
ClientTransport |
getTransport()
Return the transport to use to connect to the target server.
|
int |
hashCode() |
public String getKey()
public ClientTransport getTransport()
public static LoadbalanceTarget from(String key, ClientTransport transport)
LoadbalanceTarget with the given key and ClientTransport. The key
can be anything that identifies the target uniquely, e.g. SocketAddress, URL, and so on.key - identifies the load-balance target uniquelytransport - for connecting to the target