Contents
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, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.microbean.bean.References
get
Methods 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
- aSelectable
providing access toBean
s byAttributedType
; must not benull
; must be safe for concurrent use by multiple threads; often assembled out of methods present in theSelectables
andBeans
classes, among other such utility classesinstances
- 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
- Throws:
NullPointerException
- ifs
,instances
, orcp
isnull
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceDestruction
-
id
-
iterator
-
references
- Specified by:
references
in interfaceReferencesSelector
-
size
- Specified by:
size
in interfaceReferences<I>
-
destroy
- Specified by:
destroy
in interfaceReferences<I>
-