77: Make NenjimHub the runtime owner and replace NenjimApplication with NenjimProcess

This commit is contained in:
2026-09-02 15:59:56 +02:00
parent a252c256c4
commit f5fc5bb3b5
29 changed files with 1012 additions and 461 deletions
+19 -13
View File
@@ -119,24 +119,30 @@ PREFERRED=nenjim:com_r35157_nenjim-hubd-api=1.0.3:'Built together'</code></pre>
<h2>Components and the central Registry</h2>
<p>A Nenjim component is a fully constructed building block ready for use. Its consumer decides whether it acts
as a service, application, algorithm, or adapter. <code>NenjimComponent</code> is therefore a pure marker,
while <code>NenjimApplication</code> adds only a common <code>start()</code> operation and no common stop.</p>
as a service, application, algorithm, or adapter. A service exposes a domain API, while application describes
a user-facing or orchestration role. <code>NenjimComponent</code> is therefore a pure marker. Independently,
the canonical <code>com.r35157.nenjim.process.NenjimProcess</code> marks an active component that the Hub can
start and track; it adds only <code>start()</code> and no common stop, restart, or health operation.</p>
<p>A <code>NenjimComponentId</code> is lower-case lookup metadata owned by one Registry, not a property of the
object, an authorization boundary, or an artifact version. One object may have several IDs. Conversely, one
registration is indexed under every component interface implemented by that object, so its typed service and
application views retain reference identity.</p>
registration is indexed under every component interface implemented by that object, so the Registry object's
typed service and process views retain reference identity.</p>
<p><code>NenjimRegistryService</code> is the injected read-only consumer view. It returns immutable,
registration-ordered ID snapshots for a component interface and supports lookup by explicit ID plus expected
interface. Missing IDs return <code>null</code>; requesting an existing ID through the wrong interface is a
caller error. Registration is available only through a package-private administration view retained by the
Registry manager.</p>
<p><code>NenjimRegistryServiceManagerImpl</code> starts and registers the Registry first, registers itself second,
and then constructs and registers the hardcoded component graph in dependency order. Applications own their
selection and activation: the Ticker explicitly selects the Raydium EVE/USDT source ID while the hardcoded
source remains registered but inactive. The manager activates only the existing explicit five-application
sequence; it does not start every <code>NenjimApplication</code>.
<code>com.r35157.nenjim.hubd.Main</code> is only the outer Java bootstrap; <code>Main.main(...)</code> starts
this manager and is not itself a component or application.</p>
caller error. Registration is available only through a package-private administration view behind the passive
Registry manager. That manager exposes only registration, is neither a component nor a process, is not
registered, and cannot start anything. The internal administration interface must remain package-private so
an ordinary service consumer cannot cast the Registry object to a mutation view.</p>
<p><code>NenjimHubImpl</code> is the global composition and runtime owner. It constructs the Registry assembly,
starts and registers the Registry first, records its successful process ID, and then constructs and registers
the hardcoded component graph in dependency order. The Ticker explicitly selects the Raydium EVE/USDT source
ID while the hardcoded source remains registered but inactive. The Hub activates only the existing explicit
five-process sequence after the Registry; it does not start every registered process. Successful process IDs
are exposed as immutable ordered point-in-time snapshots, without implying continued health.</p>
<p><code>com.r35157.nenjim.hubd.Main</code> remains only the outer Java bootstrap. It constructs the reference Hub
through the public <code>NenjimHub</code> interface and calls <code>start()</code> once. The Hub is neither a
component nor a process and is not registered inside its own Registry.</p>
<p>The Registry remains internally open to later registration, but this version has one catalogue and no Context,
version resolution, classloader integration, discovery, public runtime loading or registration, removal,
persistence, events, ownership tracking, usage counts, permissions, scopes, filtered views, or automatic