Class DefaultValueCodec
java.lang.Object
org.j7m.middleware.codec.defaultcodec.DefaultValueCodec
- All Implemented Interfaces:
org.j7m.middleware.codec.api.ValueCodec
public final class DefaultValueCodec
extends Object
implements org.j7m.middleware.codec.api.ValueCodec
Deterministic Phase 1 value codec.
The codec preserves common immutable values, lists, string-keyed maps,
enums, exceptions as safe descriptors, explicit ObjectRef handles,
and a small allow-list of trusted schema records used by executable
examples. Applications may explicitly register DTO/record schemas with trusted
extractor/factory functions. Adjacent versions may add or remove optional fields;
payload validation finishes before the target factory runs. Unregistered records
are rejected because accessors and constructors are application code. The codec
never loads classes from wire type names and does not use Java native serialization.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a default codec with no application schemas.DefaultValueCodec(org.j7m.middleware.codec.api.SchemaRegistry schemas) Creates a codec with an explicit application schema allowlist. -
Method Summary
-
Constructor Details
-
DefaultValueCodec
public DefaultValueCodec()Creates a default codec with no application schemas. -
DefaultValueCodec
public DefaultValueCodec(org.j7m.middleware.codec.api.SchemaRegistry schemas) Creates a codec with an explicit application schema allowlist.- Parameters:
schemas- immutable trusted schemas; never null
-
-
Method Details
-
encode
-
decode
-