public interface Transport
This is a low level abstraction that serves to provide Catalyst clients and servers with Client
and Server instances. Throughout the lifetime of a Transport, Catalyst may
call on the transport to create multiple Client and Server
objects. Each Client and Server is identified by a UUID which is assumed to be unique
to that instance across the entire Catalyst cluster.
When the Transport is closed, it should close all Client
and Server instances created by it if they're not already closed.
| Modifier and Type | Method and Description |
|---|---|
Client |
client(UUID id)
Creates a transport client.
|
CompletableFuture<Void> |
close()
Closes the transport.
|
Server |
server(UUID id)
Creates a transport server.
|
Client client(UUID id)
The provided UUID is a cluster-wide unique identifier for the client. The Connection.id()
for all Connection objects created by the client should reflect the provided
id. Additionally, Connection objects created by any
Server to which the provided client connects should have the same
Connection.id() .
id - The client ID.NullPointerException - if id is nullServer server(UUID id)
The provided UUID is a cluster-wide unique identifier for the client. However, note that
Connection objects created by the provided Server
should be created with the Connection.id() of the connecting Client and
not the provided Server itself.
id - The server ID.NullPointerException - if id is nullCompletableFuture<Void> close()
When the transport is closed, all Client and Server
objects provided by the Transport should be closed if not closed already.
Copyright © 2013–2015. All rights reserved.