AggregateIdLimits

How long an aggregate id may be, so that every route by its id reaches it behind a gateway's path check: the one definition, which the kernel's rule of ids (AggregateIds) and the check of the routes a Manifest declares both read, and the documentation states. A gateway that bounds a path differently changes these numbers here alone.

  • MAX_LENGTH, 256 UTF-16 units: the longest path segment the gateway takes, decoded.

  • MAX_BYTES, 512 bytes in UTF-8: the id's share of the longest path the gateway takes, MAX_PATH_LENGTH less what the rest of a route by id may take (MAX_ROUTE_REST), 1,536 characters, over the most a percent-encoder writes for one byte (MAX_ESCAPE): whatever a client encodes, the id's segment fits its share.

The gateway is CoSec 8 (PathNormalizer): a segment of at most 256 UTF-16 units once decoded, and a path of at most 2,048 characters as received, without its query.

Properties

Link copied to clipboard
const val MAX_BYTES: Int

The most bytes an aggregate id holds in UTF-8: its share of the path, 1,536 characters, over MAX_ESCAPE.

Link copied to clipboard
const val MAX_ESCAPE: Int = 3

The most characters a percent-encoder writes for one byte: % and two hex digits.

Link copied to clipboard
const val MAX_LENGTH: Int = 256

The longest aggregate id, in UTF-16 units: the longest path segment the gateway takes, decoded.

Link copied to clipboard
const val MAX_PATH_LENGTH: Int = 2048

The longest path the gateway takes, in characters as received, percent-encoded, without its query.

Link copied to clipboard
const val MAX_ROUTE_REST: Int = 512

The most a route by id may take of MAX_PATH_LENGTH besides its id, in characters percent-encoded: its context, its aggregate, its last segments and its separators. A Manifest whose route by id takes more is refused.

Functions

Link copied to clipboard

The length of path percent-encoded as a client writes it, its / separators kept: one character for each / and each unreserved character (RFC 3986: letters, digits, -, ., _ and ~), three for each other byte of its UTF-8 form.

Link copied to clipboard

The number of bytes of text in UTF-8, without encoding it. A lone surrogate counts three bytes, the most an encoder writes for it (the replacement character; the JDK's writes ?, one).