Package de.aristaflow.adept2.util.injection
package de.aristaflow.adept2.util.injection
-
ClassDescriptionMarks a transient, non-final instance field of a reference type to be populated from the local environment when an injection driver claims the object (deserialised by the communication layer or, in the future, created by the registry).Marks objects whose state is serialised but whose collaborators are re-bound locally: such an object is eligible for injection by the deserialisation driver, which populates the fields annotated with
Injectedfrom the local environment and then callsInjectionAware.afterInjection().Marks a message that carries theInjectionAwareobjects a recording stream met while decoding it: the decoder attaches them as aPendingInjectionsholder, and the completion point of the deserialisation driver claims them before the payload of the message is used.The driver-agnostic engine of the injection mechanism: instance plus bindings become populatedInjectedfields.One slot to populate: the field itself and everything its declaration adds to it.The environment could not complete an object when deserialising: arequiredInjectedfield the driver cannot satisfy, a declaration the environment cannot honour at all, anInjectionAware.afterInjection()that threw – or anInjectionAwareobject met by a stream that refuses such objects instead of recording them.Tool methods around the injection into deserialised objects, above all the refusal ofInjectionAwareobjects by streams that have no driver to complete them.TheInjectionAwareobjects a recording stream met while decoding, waiting for the completion point of the driver to claim them.AnObjectInputStreamrecording theInjectionAwareobjects it reads instead of refusing them: it is the reading half of a driver, which claims the recorded objects at its completion point.AnObjectInputStreamrefusingInjectionAwareobjects: a stream without a driver cannot re-bind the collaborators of such an object, so it must not hand it out with silentlynullfields.AnObjectOutputStreamrefusingInjectionAwareobjects, the mirror ofRefusingObjectInputStreamon the write side.