Package org.glassfish.jersey.inject.hk2
Class SupplierFactoryBridge<T>
java.lang.Object
org.glassfish.jersey.inject.hk2.SupplierFactoryBridge<T>
- Type Parameters:
T
- type which could be handled bySupplier
and this bridge.
- All Implemented Interfaces:
Factory<T>
This class is able to find the
Supplier
of the particular type and use this Supplier
to create a new
instance. If the Supplier
is not found then null
is returned.
If the found Supplier
is a type of DisposableSupplier
then this bridge can delegate
Factory.dispose(Object)
invocation to DisposableSupplier.dispose(Object)
.
It's recommended to register the instance of this class as a singleton and then the provide()
is called according to
a provided scope (for the created instance) during the binding process.
-
Method Summary