Extension Registry
Routes extension messages (protocol §7) between the links and the registered extensions, and keeps them from touching anything else: core types are never routed here or sent from here, sizes and rates are capped, an exception is logged and answered, an extension failing Ext.MAX_FAILURES times in a row is switched off.
dispatch is where handlers run (the Android phone: its extension thread; a client: its main thread; tests: inline).
Constructors
Functions
The peer's caps (from its latest sync or status; absent: none). Calls onLink for every change.
Adds an extension. Refused (IllegalArgumentException) when its id or a type is not in the extension namespace, names a core type, does not belong to its id, or is already taken: an extension can never replace a core message or another extension.
Called by the app's router for a message no core handler took (and for every error). True when it was an extension's: handled, refused or dropped. False for core types: the router carries on as before. size is the encoded envelope's length when the caller has it.
Live links on which e agreed a version (debug hooks and the extension's own host).
status.ext for this link: the fields of every extension agreed with it that has some (each ≤ 1 KiB).