org.glassfish.hk2
Interface ManagedComponentProvider<T>

All Superinterfaces:
Provider<T>, Releasable
All Known Subinterfaces:
Creator<T>, Inhabitant<T>
All Known Implementing Classes:
AbstractCreatorImpl, AbstractCreatorInhabitantImpl, AbstractInhabitantImpl, ConfigBean, ConstructorCreator, CreatorImpl, Dom, EventPublishingInhabitant, ExistingSingletonInhabitant, InhabitantImpl, LazyInhabitant, ScopedInhabitant

Deprecated.

@Deprecated
public interface ManagedComponentProvider<T>
extends Provider<T>, Releasable

A ManagedComponentProvider is one in which its backing component that it provides can either be in an active or inactive state.

Lazy implies managed. However, managed does NOT imply lazy. Therefore, a ManagedComponentProvider might allow for Releasable.release() but it is not "lazy" meaning that it is active in its natural state.

ManagedComponentProviders are usually lazy, Singleton scoped services (but not always). Lazy, Singleton services exhibit the following characteristics:

  • (a) are initially not active,
  • (b) are made active by calling Provider.get(),
  • (c) once active will produce the same service each time (i.e., assert(get() == get())},
  • (d) once released, a call to get() will return a newly created instance.

    Author:
    Jerome Dochez, Jeff Trent

    Method Summary
     
    Methods inherited from interface org.glassfish.hk2.Provider
    get, getAnnotations, getByType, isActive, type
     
    Methods inherited from interface org.glassfish.hk2.Releasable
    release
     



    Copyright © 2013 Oracle Corporation. All Rights Reserved.