Class NioFastMetaNet
java.lang.Object
io.aether.net.fastMeta.nio.NioFastMetaNet
- All Implemented Interfaces:
io.aether.net.fastMeta.FastMetaNet, AutoCloseable
public class NioFastMetaNet
extends Object
implements io.aether.net.fastMeta.FastMetaNet, AutoCloseable
NIO-based implementation of the FastMetaNet factory.
This class creates and manages non-blocking clients and servers.
It runs a central I/O event loop (Reactor) in a dedicated thread
and uses a Destroyer to manage all created resources.
-
Field Summary
Fields inherited from interface io.aether.net.fastMeta.FastMetaNet
INSTANCE -
Constructor Summary
ConstructorsConstructorDescriptionInitializes the NioFastMetaNet and starts the underlying I/O reactor thread. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Shuts down the NIO reactor thread and all created clients/servers.<LT, RT extends io.aether.net.fastMeta.RemoteApi>
RTmakeClient(URI uri, io.aether.net.fastMeta.FastMetaApi<LT, ?> localApiMeta, io.aether.net.fastMeta.FastMetaApi<?, RT> remoteApiMeta, LT localApi) <LT> io.aether.net.fastMeta.MetaContextmakeClient(URI uri, io.aether.net.fastMeta.FastMetaApi<LT, ?> localApiMeta, io.aether.utils.interfaces.AFunction<io.aether.net.fastMeta.MetaContext, LT> localApiFactory) <LT> io.aether.net.fastMeta.MetaContextmakeClient(URI uri, io.aether.net.fastMeta.FastMetaApi<LT, ?> localApiMeta, LT localApi) <LT> io.aether.net.fastMeta.FastMetaServer<LT> makeServer(URI uri, io.aether.net.fastMeta.FastMetaApi<LT, ?> localApiMeta, io.aether.utils.interfaces.AFunction<io.aether.net.fastMeta.MetaContext, LT> contextConfigurator) <LT> io.aether.net.fastMeta.FastMetaServer<LT> makeServer(URI uri, io.aether.net.fastMeta.FastMetaApi<LT, ?> localApiMeta, io.aether.utils.interfaces.AFunction<io.aether.net.fastMeta.MetaContext, LT> localApiFactory, Supplier<io.aether.net.fastMeta.MetaContext> contextFactory) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.aether.net.fastMeta.FastMetaNet
makeBroadcastClient, makeClient
-
Constructor Details
-
NioFastMetaNet
public NioFastMetaNet()Initializes the NioFastMetaNet and starts the underlying I/O reactor thread.
-
-
Method Details
-
makeClient
public <LT> io.aether.net.fastMeta.MetaContext makeClient(URI uri, io.aether.net.fastMeta.FastMetaApi<LT, ?> localApiMeta, io.aether.utils.interfaces.AFunction<io.aether.net.fastMeta.MetaContext, LT> localApiFactory) - Specified by:
makeClientin interfaceio.aether.net.fastMeta.FastMetaNet
-
makeServer
public <LT> io.aether.net.fastMeta.FastMetaServer<LT> makeServer(URI uri, io.aether.net.fastMeta.FastMetaApi<LT, ?> localApiMeta, io.aether.utils.interfaces.AFunction<io.aether.net.fastMeta.MetaContext, LT> contextConfigurator) - Specified by:
makeServerin interfaceio.aether.net.fastMeta.FastMetaNet
-
close
public void close()Shuts down the NIO reactor thread and all created clients/servers.- Specified by:
closein interfaceAutoCloseable
-
makeClient
public <LT, RT extends io.aether.net.fastMeta.RemoteApi> RT makeClient(URI uri, io.aether.net.fastMeta.FastMetaApi<LT, ?> localApiMeta, io.aether.net.fastMeta.FastMetaApi<?, RT> remoteApiMeta, LT localApi) -
makeClient
public <LT> io.aether.net.fastMeta.MetaContext makeClient(URI uri, io.aether.net.fastMeta.FastMetaApi<LT, ?> localApiMeta, LT localApi) -
makeServer
-