Package io.sisu.nng.aio
Asynchronous primitives for scaling Java NNG
This package provides all the bindings and logic required for utilizing Socket
s
in a thread-safe, concurrent fashion through three different APIs:
- blocking, synchronous calls for receive, send, and sleep events on a
Context
- a
CompletableFuture
-based asynchronous api for the same - a callback-oriented, event-based approach using
AioCallback
Concurrency is achieved via the underlying nng library's
aio framework meaning you can build
highly concurrent applications using only a fraction of Java's concurrency capabilities (like
CompletableFuture
s or CountDownLatch
es).
-
Interface Summary Interface Description AioProxy Interface for theAio
API primarily to be used by anAioCallback
.ContextProxy -
Class Summary Class Description Aio Asynchronous IO (AIO) handle used primarily by Contexts.AioCallback<T> Convenience wrapper around NNG's aio callback functions.Context Wrapper of an NNG context, allowing for multi-threaded use of individual Sockets.Context.Work A unit of asynchronous work awaiting completion. -
Enum Summary Enum Description Context.Event The supported asynchronous event types, corresponding to the core asynchronous operations