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
(Domain domain, Selectable<? super AttributedType, Bean<?>> s, Instances instances, AutoCloseableRegistry acr, ClientProxier cp, BeanReduction<I> br) Creates a newRequest
. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.microbean.bean.References
get
-
Constructor Details
-
Request
public Request(Domain domain, Selectable<? super AttributedType, Bean<?>> s, Instances instances, AutoCloseableRegistry acr, ClientProxier cp, BeanReduction<I> br) Creates a newRequest
.- Parameters:
domain
- aDomain
; must not benull
s
- aSelectable
providing access toBean
s byAttributedType
; must not benull
instances
- anInstances
responsible for using aBean
to acquire an appropriateSupplier
of contextual instances; must not benull
acr
- anAutoCloseableRegistry
; may benull
in which case a default implementation will be used insteadcp
- aClientProxier
; must not benull
br
- aBeanReduction
describing the request in progress; may benull
in certain rare primordial cases- Throws:
NullPointerException
- ifdomain
,s
,instances
, orcp
isnull
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceDestruction
-
iterator
-
references
- Specified by:
references
in interfaceReferencesSelector
-
destroy
- Specified by:
destroy
in interfaceReferences<I>
-