Interface FastMetaNet


  • public interface FastMetaNet
    The core interface for the FastMeta networking factory. Provides methods to create clients and servers using the FastMeta protocol.
    • 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 from makeClient(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 to
        localApiMeta - local API definition for decoding replies
        contextConfigurator - callback to install the local API implementation into each reply context