Package org.glassfish.hk2.api
-
Interface Summary Interface Description ActiveDescriptor<T> An ActiveDescriptor contains information about a Descriptor after it has been reified.AOPProxyCtl This interface is implemented by all services that use the AOP Alliance Interceptor feature of HK2.ClassAnalyzer When HK2 automatically analyzes a class to find the constructor, fields, initializer methods and postConstruct and preDestroy methods it uses this service to analyze the class.Context<T> An implementation of this must be put into the system in order to create contextual instances of services.Descriptor A Descriptor is a bean-like structure that describes a service declaration in HK2.DescriptorFileFinder Implementations of this interface allow the customization of how hk2 inhabitant files are found.DescriptorFileFinderInformation Returns information about theInputStream
returned byDescriptorFileFinder.findDescriptorFiles()
that can be used to give better information when one of the streams fails.DynamicConfiguration This class is used to addDescriptor
s to aServiceLocator
instance.DynamicConfigurationListener A service that listens for dynamic configuration changes.DynamicConfigurationService The dynamic configuration service is the source ofDynamicConfiguration
instances, which can be used to bind and unbind entities into the systemErrorInformation This class has information in it about the error that has occurredErrorService This interface should be implemented by those who wish to be notified of error conditions that occur within HK2.Factory<T> This interface should be implemented in order to provide a factory for another type.FactoryDescriptors This is a convenience class that links together the factory descriptor as a factory for another type and the factory as a service itself.Filter This object is used to search for items in the service registryHK2Invocation This is an interface that is also implemented by theMethodInvocation
object passed to the invoke method ofMethodInterceptor
and theConstructorInvocation
object passed to the invoke method ofConstructorInterceptor
.HK2Loader This class is responsible for loading classes, and different implementations can be used for different descriptors.ImmediateController This service is advertised when the Immediate service is put into the registry.IndexedFilter This filter can be used to limit the set of Descriptors passed to the matches method.Injectee An Injectee represents the point of injection.InjectionResolver<T> This class allows users to provide a custom injection target for any annotation (including @Inject).InstanceLifecycleEvent This object contains information about a lifecycle event.InstanceLifecycleListener This processor is called for certain events in the lifecycle of instances of services.InstantiationData Contains information about the caller of aFactory.provide()
methodInstantiationService This service is used to get information about the creation of a service from an implementation ofFactory
.InterceptionService This service is implemented in order to configure interceptors on methods or constructors provided by hk2 services.IterableProvider<T> This object can be injected rather thanProvider
when it is desired to iterate over more than one returned instance of the type.JustInTimeInjectionResolver The JustInTimeInjectionResolver is called when an injection point cannot find anything to inject.MethodParameter This is used to describe the values to be given to the method in theServiceLocator.assistedInject(Object, java.lang.reflect.Method, MethodParameter...)
methodPopulator Implementations of this interface are used to populate HK2 service locators from inhabitants filesPopulatorPostProcessor This interface allows the customization of services read in from an external source.PostConstruct Classes implementing this interface register an interest in being notified when the instance has been created and the component is about to be place into commission.PreDestroy Components implementing this interface registers an interest in being notified when they are about to be decommissioned.ProxyCtl Every proxy generated by HK2 will implement this interface, which can be used to have finer control on the behavior of the proxyServiceHandle<T> This service handle can be used to get a specific instance of a service, and can be used to destroy that service as wellServiceLocator ServiceLocator is the registry for HK2 servicesServiceLocatorListener This is added to theServiceLocatorFactory
in order to listen on service locators coming and going.SingleCache<T> This cache can be used in some circumstances when there can be only one of a service.TwoPhaseResource Implementations of this interface can be added to aDynamicConfiguration
in order to atomically participate in the changes being made to theServiceLocator
.TwoPhaseTransactionData ValidationInformation This object contains information about the validation point.ValidationService This service can be used to add validation points to Descriptors.Validator This method is called when it determined that a type that is annotated with a Validating annotation is to be injected into any other class. -
Class Summary Class Description AnnotationLiteral<T extends Annotation> Supports inline instantiation of annotation type instances.ServiceLocatorFactory This factory can be used to create new named ServiceLocatorsTypeLiteral<T> Supports inline instantiation of objects that represent parameterized types with actual type parameters. -
Enum Summary Enum Description DescriptorType This describes the type of descriptorDescriptorVisibility This enumeration determines how visibility of a descriptorErrorType This enumeration describes the types of errors that might occurImmediateController.ImmediateServiceState InstanceLifecycleEventType This describes the type of lifecycle events that can happen in the systemOperation This defines the operations that may be validatedServiceLocatorFactory.CreatePolicy Tells the create method what to do if an existing ServiceLocator with the given name existsServiceLocatorState The possible states in which a service locator can be in. -
Exception Summary Exception Description DuplicateServiceException This exception is thrown when an idempotent filter of a DynamicConfiguration object matches an existing descriptor in the ServiceLocatorHK2Exception Base class for HK2 defined checked exceptionsHK2RuntimeException Base class for HK2 defined runtime exceptionsMultiException This exception can contain multiple other exceptions.UnsatisfiedDependencyException This exception will be found in aMultiException
when a class has a dependency that should be satisfied but cannot be. -
Annotation Types Summary Annotation Type Description ContractIndicator This annotation is put on annotations that are used to mark things as hk2 contracts.Customize Indicates that a method should be customized.Customizer Gives the type (and optional name) of a customizer service to use when an unknown method on a bean interface is encountered.Immediate Immediate is a scope that operates likeSingleton
scope, except that instances are created as soon as their correspondingDescriptor
s are added.InheritableThread InheritableThread is a scope that operates likePerThread
scope, except with the caveat that InheritableThread scoped services provide inheritance of values from parent thread to child thread.InjectionPointIndicator This annotation is placed on another annotation to indicate that the annotation may be used to indicate an injection pointMetadata This annotation marks a method of an annotation as providing a value that should be placed into the metadata of aDescriptor
.PerLookup PerLookup is the scope for objects that are created every time they are looked up.PerThread PerThread is a scope that operates likeSingleton
scope, except on a per-thread basis.Proxiable Scope annotations that are also marked with this annotation are proxiable.ProxyForSameScope This annotation is used when automatically analyzing a class or a {linkFactory.provide()
method to indicate that the descriptor either should or should use a proxy when being injected into a service from the same scope.Rank This annotation is used to provide the initial rank of a service marked withService
.Self This annotation is placed on an injection point that is to be injected with theActiveDescriptor
that was used to create the instance.Unproxiable This annotation must go on a scope annotation in order to indicate that no services from this scope may be proxied.Unqualified An injection point can be annotated with @Unqualified if it should only be injected with services that have no qualifiers at allUseProxy This annotation is used when automatically analyzing a class or a {linkFactory.provide()
method to indicate that the descriptor either should or should not use a proxy.Visibility This annotation is used when automatically analyzing a class or a {linkFactory.provide()
method to indicate that the descriptor either should or should not have LOCAL visibility.