Class Request<I,R>
java.lang.Object
org.microbean.reference.Request<I,R>
- Type Parameters:
I- the contextual instance type (see for exampleCreation)R- the contextual reference type (seeReferences)
- All Implemented Interfaces:
AutoCloseable,Iterable<R>,Creation<I>,Destruction,References<R>,ReferencesSelector
A central object representing a request for dependencies that is a
Creation (and therefore also a Destruction) and a References.
Instances of this class are the heart and soul of a dependency injection and acquisition system.
- Author:
- Laird Nelson
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRequest(Selectable<? super AttributedType, Bean<?>> s, Instances instances, AutoCloseableRegistry acr, ClientProxier cp) Creates a newRequest. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.microbean.bean.References
getMethods inherited from interface org.microbean.bean.ReferencesSelector
reference
-
Constructor Details
-
Request
public Request(Selectable<? super AttributedType, Bean<?>> s, Instances instances, AutoCloseableRegistry acr, ClientProxier cp) Creates a newRequest.- Parameters:
s- aSelectableproviding access toBeans byAttributedType; must not benull; must be safe for concurrent use by multiple threads; often assembled out of methods present in theSelectablesandBeansclasses, among other such utility classesinstances- anInstancesresponsible for using aBeanto acquire an appropriateSupplierof contextual instances; must not benullacr- anAutoCloseableRegistry; may benullin which case a default implementation will be used insteadcp- aClientProxier; must not benull- Throws:
NullPointerException- ifs,instances, orcpisnull
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceDestruction
-
id
-
iterator
-
references
- Specified by:
referencesin interfaceReferencesSelector
-
size
- Specified by:
sizein interfaceReferences<I>
-
destroy
- Specified by:
destroyin interfaceReferences<I>
-