Class DefaultRequest<I>
java.lang.Object
org.microbean.reference.DefaultRequest<I>
- Type Parameters:
I
- the type of contextual instance initiating the request
- All Implemented Interfaces:
AutoCloseable
,AutoCloseableRegistry
,Creation<I>
,Reducible<AttributedType,
,Bean<?>> Request<I>
,Selectable<AttributedType,
Bean<?>>
public class DefaultRequest<I>
extends Object
implements Request<I>, AutoCloseableRegistry, Reducible<AttributedType,Bean<?>>, Selectable<AttributedType,Bean<?>>
A basic implementation of the
Request
interface.- Author:
- Laird Nelson
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultRequest
(Selectable<AttributedType, Bean<?>> selectable, Reducible<AttributedType, Bean<?>> reducible, Instances instances, AutoCloseableRegistry acr, Creation<I> c, ClientProxier cp) Creates a newDefaultRequest
.DefaultRequest
(Selectable<AttributedType, Bean<?>> selectable, Reducible<AttributedType, Bean<?>> reducible, Instances instances, ClientProxier cp) Creates a newDefaultRequest
. -
Method Summary
Modifier and TypeMethodDescriptionfinal BeanReduction
<I> <J> DefaultRequest
<J> child
(BeanReduction<J> beanReduction) void
close()
boolean
closed()
final void
final AutoCloseableRegistry
newChild()
final Bean
<?> reduce
(AttributedType attributedType) final <R> R
reference
(AttributedType attributedType) final <R> R
reference
(AttributedType attributedType, Bean<R> bean, Creation<R> c) final <R> R
reference
(AttributedType attributedType, Creation<R> c) boolean
register
(AutoCloseable closeable) select
(AttributedType attributedType) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.microbean.bean.Request
primordial
Methods inherited from interface org.microbean.bean.Selectable
list
-
Constructor Details
-
DefaultRequest
public DefaultRequest(Selectable<AttributedType, Bean<?>> selectable, Reducible<AttributedType, Bean<?>> reducible, Instances instances, ClientProxier cp) Creates a newDefaultRequest
.- Parameters:
selectable
- aSelectable
that selectsBean
s given anAttributedType
; must not benull
reducible
- aReducible
that reduces collections ofBean
s; must not benull
instances
- anInstances
implementation; must not benull
cp
- aClientProxier
; must not benull
- Throws:
NullPointerException
- if any argument isnull
-
DefaultRequest
public DefaultRequest(Selectable<AttributedType, Bean<?>> selectable, Reducible<AttributedType, Bean<?>> reducible, Instances instances, AutoCloseableRegistry acr, Creation<I> c, ClientProxier cp) Creates a newDefaultRequest
.- Parameters:
selectable
- aSelectable
that selectsBean
s given anAttributedType
; must not benull
reducible
- aReducible
that reduces collections ofBean
s; must not benull
instances
- anInstances
implementation; must not benull
acr
- anAutoCloseableRegistry
; may benull
in which case a default implementation will be used insteadc
- aCreation
implementation; may benull
in which case a default implementation will be used insteadcp
- aClientProxier
; must not benull
- Throws:
NullPointerException
- ifselectable
,reducible
,instances
orcp
isnull
-
-
Method Details
-
beanReduction
- Specified by:
beanReduction
in interfaceRequest<I>
-
child
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceAutoCloseableRegistry
-
closed
- Specified by:
closed
in interfaceAutoCloseableRegistry
-
created
-
newChild
- Specified by:
newChild
in interfaceAutoCloseableRegistry
-
reduce
- Specified by:
reduce
in interfaceReducible<AttributedType,
Bean<?>>
-
reference
-
reference
-
reference
-
register
- Specified by:
register
in interfaceAutoCloseableRegistry
-
select
- Specified by:
select
in interfaceSelectable<AttributedType,
Bean<?>>
-