Design Principles#
- The Java API largely consists of interfaces with factory methods named
of
orofXxx
. - Nullable types are annotated with org.jspecify.Nullable.
Types not annotated with
Nullable
are implicitly org.jspecify.NonNull. Non-nullness of method arguments is not enforced with runtime checks. - MxPack throws the exception types listed in MxPackException.
- MxPack embraces Java NIO. For best performance, use MessageSources and MessageSinks backed by java.nio.channels.Channels. Byte buffers are represented as java.nio.ByteBuffer and LeasedByteBuffer. If frequent buffer allocations are a concern, share a single pooled BufferAllocator between message sources and sinks.