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 bySupplierand this bridge.
- All Implemented Interfaces:
Factory<T>
public class SupplierFactoryBridge<T> extends Object implements Factory<T>
This class is able to find theSupplierof the particular type and use thisSupplierto create a new instance. If theSupplieris not found thennullis returned. If the foundSupplieris a type ofDisposableSupplierthen this bridge can delegateFactory.dispose(Object)invocation toDisposableSupplier.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.