Class InstanceSupplierFactoryBridge<T>
java.lang.Object
org.glassfish.jersey.inject.hk2.InstanceSupplierFactoryBridge<T>
- Type Parameters:
T- type which could be handled bySupplierand this bridge.
- All Implemented Interfaces:
org.glassfish.hk2.api.Factory<T>
public class InstanceSupplierFactoryBridge<T>
extends Object
implements org.glassfish.hk2.api.Factory<T>
This class is used as a bridge between
HK2 Factory and JDK Supplier. Using this class Supplier
is able to behave as a factory in service locator. The bridge just delegates all invocations to provided ServiceLocator
and therefore all operation should be in proper scope and context.
This bridge is dedicated to instance binding therefore underlying supplier is always only single instance.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInstanceSupplierFactoryBridge(Supplier<T> supplier, boolean disposable) Constructor for a new bridge. -
Method Summary
-
Field Details
-
supplier
-
disposable
private boolean disposable
-
-
Constructor Details
-
InstanceSupplierFactoryBridge
-
-
Method Details
-
provide
-
dispose
-