Package io.aether.net.fastMeta
Interface FastMetaNet
-
public interface FastMetaNetThe core interface for the FastMeta networking factory. Provides methods to create clients and servers using the FastMeta protocol.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.concurrent.atomic.AtomicReference<FastMetaNet>INSTANCESingleton holder for the active networking implementation (e.g., Netty).
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <LT> FastMetaBroadcast<LT>makeBroadcastClient(java.net.URI broadcastUri, FastMetaApi<LT,?> localApiMeta, io.aether.utils.interfaces.AFunction<MetaContext,LT> contextConfigurator)Creates a UDP broadcast client.default <LT,RT extends RemoteApi>
RTmakeClient(java.net.URI uri, FastMetaApi<LT,?> localApiMeta, FastMetaApi<?,RT> remoteApiMeta, io.aether.utils.interfaces.AFunction<RT,LT> contextFactory)Creates a client with full RemoteApi support.<LT> MetaContextmakeClient(java.net.URI uri, FastMetaApi<LT,?> localApiMeta, io.aether.utils.interfaces.AFunction<MetaContext,LT> localApiFactory)Creates a lightweight client, returning MetaContext.<LT> FastMetaServer<LT>makeServer(java.net.URI uri, FastMetaApi<LT,?> localApiMeta, io.aether.utils.interfaces.AFunction<MetaContext,LT> contextConfigurator)
-
-
-
Field Detail
-
INSTANCE
static final java.util.concurrent.atomic.AtomicReference<FastMetaNet> INSTANCE
Singleton holder for the active networking implementation (e.g., Netty).
-
-
Method Detail
-
makeClient
default <LT,RT extends RemoteApi> RT makeClient(java.net.URI uri, FastMetaApi<LT,?> localApiMeta, FastMetaApi<?,RT> remoteApiMeta, io.aether.utils.interfaces.AFunction<RT,LT> contextFactory)
Creates a client with full RemoteApi support.- Returns:
- RemoteApi instance ready for outgoing calls.
-
makeClient
<LT> MetaContext makeClient(java.net.URI uri, FastMetaApi<LT,?> localApiMeta, io.aether.utils.interfaces.AFunction<MetaContext,LT> localApiFactory)
Creates a lightweight client, returning MetaContext. Caller creates RemoteApi via MetaContext.makeRemote().
-
makeServer
<LT> FastMetaServer<LT> makeServer(java.net.URI uri, FastMetaApi<LT,?> localApiMeta, io.aether.utils.interfaces.AFunction<MetaContext,LT> contextConfigurator)
-
makeBroadcastClient
default <LT> FastMetaBroadcast<LT> makeBroadcastClient(java.net.URI broadcastUri, FastMetaApi<LT,?> localApiMeta, io.aether.utils.interfaces.AFunction<MetaContext,LT> contextConfigurator)
Creates a UDP broadcast client.The returned client sends request datagrams to a well-known multicast or broadcast endpoint and decodes each incoming reply in a fresh
MetaContext. This mode is fundamentally different frommakeClient(URI, FastMetaApi, AFunction): a regular client is bound to a single remote peer, while a broadcast client handles replies from any number of peers arriving on the same socket.Implementations that do not support broadcast UDP should leave the default behavior, which throws
UnsupportedOperationException.- Parameters:
broadcastUri- multicast or broadcast endpoint to send tolocalApiMeta- local API definition for decoding repliescontextConfigurator- callback to install the local API implementation into each reply context
-
-