Modifier and Type | Method and Description |
---|---|
ServiceLocator |
ModulesRegistry.createServiceLocator()
Creates the default
ServiceLocator from all the modules in this registry
Calling this method has the same effect of calling #createServiceLocator("default") |
ServiceLocator |
ModulesRegistry.createServiceLocator(java.lang.String name)
Creates a
ServiceLocator from all the modules in this registry
Cal;ling this method has the same effect of calling ModulesRegistry.newServiceLocator() followed by
#populateServiceLocator(String, org.glassfish.hk2.api.ServiceLocator, java.util.List . |
ServiceLocator |
ModulesRegistry.newServiceLocator()
Creates an uninitialized
ServiceLocator |
ServiceLocator |
ModulesRegistry.newServiceLocator(ServiceLocator parent) |
void |
ModulesRegistry.populateConfig(ServiceLocator serviceLocator) |
void |
ModulesRegistry.populateServiceLocator(java.lang.String name,
ServiceLocator h,
java.util.List<PopulatorPostProcessor> postProcessors)
Populates a
ServiceLocator from all the modules in this registry. |
Modifier and Type | Method and Description |
---|---|
ServiceLocator |
AbstractModulesRegistryImpl.createServiceLocator() |
ServiceLocator |
AbstractModulesRegistryImpl.createServiceLocator(ServiceLocator parent,
java.lang.String name,
java.util.List<PopulatorPostProcessor> postProcessors) |
ServiceLocator |
AbstractModulesRegistryImpl.createServiceLocator(java.lang.String name) |
protected void |
AbstractModulesRegistryImpl.initializeServiceLocator(ServiceLocator serviceLocator) |
ServiceLocator |
AbstractModulesRegistryImpl.newServiceLocator()
Creates an uninitialized
ServiceLocator |
ServiceLocator |
AbstractModulesRegistryImpl.newServiceLocator(ServiceLocator parent)
Create a new ServiceLocator optionally providing a parent Services
|
void |
AbstractModulesRegistryImpl.populateServiceLocator(java.lang.String name,
ServiceLocator serviceLocator,
java.util.List<PopulatorPostProcessor> postProcessors)
Creates a
ServiceLocator from all the modules in this registry |
Modifier and Type | Method and Description |
---|---|
ServiceLocator |
StaticModulesRegistry.createServiceLocator(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
MultiException |
ErrorInformation.getAssociatedException()
This will contain the associated exception or exceptions that caused
the failure.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
ProxyCtl.__make()
This method causes the proxy instance to get created at the current time, without
calling any of the methods on the underlying class itself.
|
<T> ActiveDescriptor<T> |
DynamicConfiguration.addActiveDescriptor(java.lang.Class<T> rawClass)
This adds an active descriptor to the system based completely on the analysis
of the given class.
|
<T> FactoryDescriptors |
DynamicConfiguration.addActiveFactoryDescriptor(java.lang.Class<? extends Factory<T>> rawFactoryClass)
This adds two active descriptors to the system based completely on the analysis
of the given
Factory class. |
void |
DynamicConfiguration.commit()
This causes the configuration to get committed.
|
java.util.List<ServiceHandle<?>> |
ServiceLocator.getAllServiceHandles(java.lang.annotation.Annotation qualifier,
java.lang.annotation.Annotation... qualifiers)
Gets a list of
ServiceHandle that can be used to get and destroy services
associated with descriptors that match the provided criteria |
<T> java.util.List<ServiceHandle<T>> |
ServiceLocator.getAllServiceHandles(java.lang.Class<T> contractOrImpl,
java.lang.annotation.Annotation... qualifiers)
Gets a list of
ServiceHandle that can be used to get and destroy services
associated with descriptors that match the provided criteria |
java.util.List<ServiceHandle<?>> |
ServiceLocator.getAllServiceHandles(Filter searchCriteria)
Gets a list of
ServiceHandle whose ActiveDescriptor s match
the supplied filter. |
java.util.List<ServiceHandle<?>> |
ServiceLocator.getAllServiceHandles(java.lang.reflect.Type contractOrImpl,
java.lang.annotation.Annotation... qualifiers)
Gets a list of
ServiceHandle that can be used to get and destroy services
associated with descriptors that match the provided criteria |
<T> java.util.List<T> |
ServiceLocator.getAllServices(java.lang.annotation.Annotation qualifier,
java.lang.annotation.Annotation... qualifiers)
Gets all services from this locator that have the provided qualifiers
|
<T> java.util.List<T> |
ServiceLocator.getAllServices(java.lang.Class<T> contractOrImpl,
java.lang.annotation.Annotation... qualifiers)
Gets all services from this locator that implement this contract or have this
implementation and have the provided qualifiers
|
java.util.List<?> |
ServiceLocator.getAllServices(Filter searchCriteria)
Gets all services from this locator that match the provided
Filter |
<T> java.util.List<T> |
ServiceLocator.getAllServices(java.lang.reflect.Type contractOrImpl,
java.lang.annotation.Annotation... qualifiers)
Gets all services from this locator that implement this contract or have this
implementation and have the provided qualifiers
|
<T> java.lang.reflect.Constructor<T> |
ClassAnalyzer.getConstructor(java.lang.Class<T> clazz)
Will return the constructor that it to be used when constructing this
service
|
<T> java.util.Set<java.lang.reflect.Field> |
ClassAnalyzer.getFields(java.lang.Class<T> clazz)
Will return the set of initializer fields to be used when initializing
this service
|
<T> java.util.Set<java.lang.reflect.Method> |
ClassAnalyzer.getInitializerMethods(java.lang.Class<T> clazz)
Will return the set of initializer method to be used when initializing
this service
|
ActiveDescriptor<?> |
ServiceLocator.getInjecteeDescriptor(Injectee injectee)
This method will first find a descriptor for this injectee, and then
reify that descriptor.
|
<T> java.lang.reflect.Method |
ClassAnalyzer.getPostConstructMethod(java.lang.Class<T> clazz)
Will return the postConstruct method of the class
|
<T> java.lang.reflect.Method |
ClassAnalyzer.getPreDestroyMethod(java.lang.Class<T> clazz)
Will return the preDestroy method of the class
|
<T> T |
ServiceLocator.getService(ActiveDescriptor<T> activeDescriptor,
ServiceHandle<?> root)
|
<T> T |
ServiceLocator.getService(ActiveDescriptor<T> activeDescriptor,
ServiceHandle<?> root,
Injectee injectee)
This method should be called by code resolving injectee's on behalf of some
root service, usually by an implementation of
InjectionResolver.resolve(Injectee, ServiceHandle) . |
<T> T |
ServiceLocator.getService(java.lang.Class<T> contractOrImpl,
java.lang.annotation.Annotation... qualifiers)
Gets the best service from this locator that implements
this contract or has this implementation
|
<T> T |
ServiceLocator.getService(java.lang.Class<T> contractOrImpl,
java.lang.String name,
java.lang.annotation.Annotation... qualifiers)
Gets the best service from this locator that implements
this contract or has this implementation and has the given
name
|
<T> T |
ServiceLocator.getService(java.lang.reflect.Type contractOrImpl,
java.lang.annotation.Annotation... qualifiers)
Gets the best service from this locator that implements
this contract or has this implementation
|
<T> T |
ServiceLocator.getService(java.lang.reflect.Type contractOrImpl,
java.lang.String name,
java.lang.annotation.Annotation... qualifiers)
Gets the best service from this locator that implements
this contract or has this implementation and has the given
name
|
<T> ServiceHandle<T> |
ServiceLocator.getServiceHandle(ActiveDescriptor<T> activeDescriptor)
Gets a
ServiceHandle that can be used to get and destroy the service
described by the ActiveDescriptor . |
<T> ServiceHandle<T> |
ServiceLocator.getServiceHandle(ActiveDescriptor<T> activeDescriptor,
Injectee injectee)
Gets a
ServiceHandle that can be used to get and destroy the service
described by the ActiveDescriptor . |
<T> ServiceHandle<T> |
ServiceLocator.getServiceHandle(java.lang.Class<T> contractOrImpl,
java.lang.annotation.Annotation... qualifiers)
Gets a
ServiceHandle that can be used to get and destroy the
service that best matches the given criteria |
<T> ServiceHandle<T> |
ServiceLocator.getServiceHandle(java.lang.Class<T> contractOrImpl,
java.lang.String name,
java.lang.annotation.Annotation... qualifiers)
Gets a
ServiceHandle that can be used to get and destroy the
service that best matches the given criteria |
<T> ServiceHandle<T> |
ServiceLocator.getServiceHandle(java.lang.reflect.Type contractOrImpl,
java.lang.annotation.Annotation... qualifiers)
Gets a
ServiceHandle that can be used to get and destroy the
service that best matches the given criteria |
<T> ServiceHandle<T> |
ServiceLocator.getServiceHandle(java.lang.reflect.Type contractOrImpl,
java.lang.String name,
java.lang.annotation.Annotation... qualifiers)
Gets a
ServiceHandle that can be used to get and destroy the
service that best matches the given criteria |
java.lang.Class<?> |
HK2Loader.loadClass(java.lang.String className)
Loads a class given the class name to instantiate
|
void |
ErrorService.onFailure(ErrorInformation errorInformation)
This method is called when a failure occurs in the system.
|
java.util.List<ActiveDescriptor<?>> |
Populator.populate()
This method will populate the service locator using the system classloader to
find the hk2-locator files from the default location of META-INF/hk2-locator/default.
|
java.util.List<ActiveDescriptor<?>> |
Populator.populate(DescriptorFileFinder fileFinder,
PopulatorPostProcessor... postProcessors)
This method can be used to populate the service locator with files that
have been written out using the
DescriptorImpl writeObject method. |
void |
TwoPhaseResource.prepareDynamicConfiguration(TwoPhaseTransactionData dynamicConfiguration)
This method is called prior to any changes being made to the
ServiceLocator
but after the IdempotentFilters are called. |
ActiveDescriptor<?> |
ServiceLocator.reifyDescriptor(Descriptor descriptor)
Converts a descriptor to an ActiveDescriptor.
|
ActiveDescriptor<?> |
ServiceLocator.reifyDescriptor(Descriptor descriptor,
Injectee injectee)
Converts a descriptor to an ActiveDescriptor.
|
Modifier and Type | Method and Description |
---|---|
void |
WriteableBeanDatabase.commit()
This method should be called when the writeable database should become
the current database.
|
void |
WriteableBeanDatabase.commit(java.lang.Object commitMessage)
This method should be called when the writeable database should become
the current database.
|
Modifier and Type | Method and Description |
---|---|
void |
WriteableBeanDatabaseImpl.TwoPhaseResourceImpl.prepareDynamicConfiguration(TwoPhaseTransactionData dynamicConfiguration) |
Modifier and Type | Method and Description |
---|---|
private static boolean |
ExtrasUtilities.isDupException(MultiException me) |
Modifier and Type | Method and Description |
---|---|
void |
DefaultTopicDistributionErrorService.subscribersFailed(Topic<?> topic,
java.lang.Object message,
MultiException error)
This method will be called once per
Topic.publish(Object)
call after the message has been distributed to all subscribers. |
Modifier and Type | Method and Description |
---|---|
void |
ImmediateHelper.onFailure(ErrorInformation errorInformation) |
Modifier and Type | Method and Description |
---|---|
private static boolean |
RunLevelServiceUtilities.isDupException(MultiException me) |
Modifier and Type | Field and Description |
---|---|
private MultiException |
CurrentTaskFuture.UpOneLevel.accumulatedExceptions |
private MultiException |
CurrentTaskFuture.UpAllTheWay.exception |
Modifier and Type | Method and Description |
---|---|
private void |
CurrentTaskFuture.UpAllTheWay.currentJobComplete(MultiException accumulatedExceptions) |
Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
CurrentTaskFuture.AllTheWay.waitForResult(long timeout,
java.util.concurrent.TimeUnit unit)
The method to call on the internal job
|
java.lang.Boolean |
CurrentTaskFuture.UpAllTheWay.waitForResult(long timeout,
java.util.concurrent.TimeUnit unit) |
java.lang.Boolean |
CurrentTaskFuture.DownAllTheWay.waitForResult(long timeout,
java.util.concurrent.TimeUnit unit) |
Modifier and Type | Method and Description |
---|---|
private static boolean |
ServiceLocatorUtilities.isDupException(MultiException me) |
Modifier and Type | Method and Description |
---|---|
static ServiceLocator |
ServiceLocatorUtilities.createAndPopulateServiceLocator(java.lang.String name)
This method is often the first line of a stand-alone client that wishes to use HK2.
|
static <T> T |
ServiceLocatorUtilities.findOrCreateService(ServiceLocator locator,
java.lang.Class<T> type,
java.lang.annotation.Annotation... qualifiers)
This method will first attempt to find a service corresponding to the type and qualifiers
passed in to the method, and if one is found simply returns it.
|
java.lang.Class<?> |
HK2LoaderImpl.loadClass(java.lang.String className) |
void |
RethrowErrorService.onFailure(ErrorInformation errorInformation) |
Modifier and Type | Method and Description |
---|---|
<T> ActiveDescriptor<T> |
AbstractBinder.addActiveDescriptor(java.lang.Class<T> rawClass)
This adds an active descriptor to the system based completely on the analysis
of the given class.
|
<T> FactoryDescriptors |
AbstractBinder.addActiveFactoryDescriptor(java.lang.Class<? extends Factory<T>> rawFactoryClass)
This adds two active descriptors to the system based completely on the analysis
of the given
Factory class. |
void |
AbstractBinder.commit()
This causes the configuration to get committed.
|
Modifier and Type | Field and Description |
---|---|
private MultiException |
ErrorInformationImpl.exception |
private MultiException |
ErrorResults.me |
Modifier and Type | Method and Description |
---|---|
MultiException |
ErrorInformationImpl.getAssociatedException() |
(package private) MultiException |
ErrorResults.getMe() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
NarrowResults.addError(ActiveDescriptor<?> fail,
Injectee injectee,
MultiException me) |
void |
Collector.addMultiException(MultiException me) |
Modifier and Type | Method and Description |
---|---|
<T> FactoryDescriptors |
DynamicConfigurationImpl.addActiveFactoryDescriptor(java.lang.Class<? extends Factory<T>> rawFactoryClass) |
void |
DynamicConfigurationImpl.commit() |
T |
FactoryCreator.create(ServiceHandle<?> root,
SystemDescriptor<?> eventThrower) |
T |
Creator.create(ServiceHandle<?> root,
SystemDescriptor<?> eventThrower)
Creates an instance of the given type
|
static <T> AutoActiveDescriptor<T> |
Utilities.createAutoDescriptor(java.lang.Class<T> clazz,
ServiceLocatorImpl locator)
Creates a reified automatically generated descriptor
|
static <T> AutoActiveDescriptor<T> |
Utilities.createAutoFactoryDescriptor(java.lang.Class<T> parentClazz,
ActiveDescriptor<?> factoryDescriptor,
ServiceLocatorImpl locator)
Creates a reified automatically generated descriptor
|
void |
Creator.dispose(T instance)
Disposes the given instance
|
java.util.List<ServiceHandle<?>> |
ServiceLocatorImpl.getAllServiceHandles(java.lang.annotation.Annotation qualifier,
java.lang.annotation.Annotation... qualifiers) |
<T> java.util.List<ServiceHandle<T>> |
ServiceLocatorImpl.getAllServiceHandles(java.lang.Class<T> contractOrImpl,
java.lang.annotation.Annotation... qualifiers) |
java.util.List<ServiceHandle<?>> |
ServiceLocatorImpl.getAllServiceHandles(Filter searchCriteria) |
java.util.List<ServiceHandle<?>> |
ServiceLocatorImpl.getAllServiceHandles(java.lang.reflect.Type contractOrImpl,
java.lang.annotation.Annotation... qualifiers) |
<T> java.util.List<T> |
ServiceLocatorImpl.getAllServices(java.lang.annotation.Annotation qualifier,
java.lang.annotation.Annotation... qualifiers) |
<T> java.util.List<T> |
ServiceLocatorImpl.getAllServices(java.lang.Class<T> contractOrImpl,
java.lang.annotation.Annotation... qualifiers) |
java.util.List<?> |
ServiceLocatorImpl.getAllServices(Filter searchCriteria) |
<T> java.util.List<T> |
ServiceLocatorImpl.getAllServices(java.lang.reflect.Type contractOrImpl,
java.lang.annotation.Annotation... qualifiers) |
(package private) java.util.List<ServiceHandle<?>> |
ServiceLocatorImpl.getAllUnqualifiedServiceHandles(java.lang.reflect.Type contractOrImpl,
Unqualified unqualified,
boolean isIterable,
java.lang.annotation.Annotation... qualifiers) |
<T> java.lang.reflect.Constructor<T> |
DefaultClassAnalyzer.getConstructor(java.lang.Class<T> clazz) |
<T> java.util.Set<java.lang.reflect.Field> |
DefaultClassAnalyzer.getFields(java.lang.Class<T> clazz) |
<T> java.util.Set<java.lang.reflect.Method> |
DefaultClassAnalyzer.getInitializerMethods(java.lang.Class<T> clazz) |
ActiveDescriptor<?> |
ServiceLocatorImpl.getInjecteeDescriptor(Injectee injectee) |
<T> java.lang.reflect.Method |
DefaultClassAnalyzer.getPostConstructMethod(java.lang.Class<T> clazz) |
<T> java.lang.reflect.Method |
DefaultClassAnalyzer.getPreDestroyMethod(java.lang.Class<T> clazz) |
<T> T |
ServiceLocatorImpl.getService(ActiveDescriptor<T> activeDescriptor,
ServiceHandle<?> root)
Deprecated.
|
<T> T |
ServiceLocatorImpl.getService(ActiveDescriptor<T> activeDescriptor,
ServiceHandle<?> root,
Injectee originalRequest) |
<T> T |
ServiceLocatorImpl.getService(java.lang.Class<T> contractOrImpl,
java.lang.annotation.Annotation... qualifiers) |
<T> T |
ServiceLocatorImpl.getService(java.lang.Class<T> contractOrImpl,
java.lang.String name,
java.lang.annotation.Annotation... qualifiers) |
<T> T |
ServiceLocatorImpl.getService(java.lang.reflect.Type contractOrImpl,
java.lang.annotation.Annotation... qualifiers) |
<T> T |
ServiceLocatorImpl.getService(java.lang.reflect.Type contractOrImpl,
java.lang.String name,
java.lang.annotation.Annotation... qualifiers) |
<T> ServiceHandle<T> |
ServiceLocatorImpl.getServiceHandle(ActiveDescriptor<T> activeDescriptor) |
<T> ServiceHandle<T> |
ServiceLocatorImpl.getServiceHandle(ActiveDescriptor<T> activeDescriptor,
Injectee injectee) |
<T> ServiceHandle<T> |
ServiceLocatorImpl.getServiceHandle(java.lang.Class<T> contractOrImpl,
java.lang.annotation.Annotation... qualifiers) |
<T> ServiceHandle<T> |
ServiceLocatorImpl.getServiceHandle(java.lang.Class<T> contractOrImpl,
java.lang.String name,
java.lang.annotation.Annotation... qualifiers) |
<T> ServiceHandle<T> |
ServiceLocatorImpl.getServiceHandle(java.lang.reflect.Type contractOrImpl,
java.lang.annotation.Annotation... qualifiers) |
<T> ServiceHandle<T> |
ServiceLocatorImpl.getServiceHandle(java.lang.reflect.Type contractOrImpl,
java.lang.String name,
java.lang.annotation.Annotation... qualifiers) |
private <T> ServiceHandleImpl<T> |
ServiceLocatorImpl.getServiceHandleImpl(ActiveDescriptor<T> activeDescriptor,
Injectee injectee) |
(package private) <T> T |
ServiceLocatorImpl.getUnqualifiedService(java.lang.reflect.Type contractOrImpl,
Unqualified unqualified,
boolean isIterable,
java.lang.annotation.Annotation... qualifiers)
This method is only called from the get of IterableProvider.
|
(package private) <T> ServiceHandle<T> |
ServiceLocatorImpl.getUnqualifiedServiceHandle(java.lang.reflect.Type contractOrImpl,
Unqualified unqualified,
boolean isIterable,
java.lang.annotation.Annotation... qualifiers) |
private java.util.List<?> |
ServiceLocatorImpl.internalGetAllServiceHandles(java.lang.reflect.Type contractOrImpl,
Unqualified unqualified,
boolean getHandles,
boolean isIterable,
java.lang.annotation.Annotation... qualifiers) |
private <T> ActiveDescriptor<T> |
ServiceLocatorImpl.internalGetDescriptor(Injectee onBehalfOf,
java.lang.reflect.Type contractOrImpl,
java.lang.String name,
Unqualified unqualified,
boolean isIterable,
java.lang.annotation.Annotation... qualifiers) |
private <T> ActiveDescriptor<T> |
ServiceLocatorImpl.internalGetDescriptor(Injectee onBehalfOf,
java.lang.reflect.Type contractOrImpl,
java.lang.String name,
Unqualified unqualified,
boolean isIterable,
boolean calledFromSecondChanceResolveMethod,
java.lang.annotation.Annotation... qualifiers) |
ActiveDescriptor<?> |
ServiceLocatorImpl.reifyDescriptor(Descriptor descriptor) |
ActiveDescriptor<?> |
ServiceLocatorImpl.reifyDescriptor(Descriptor descriptor,
Injectee injectee) |
private java.util.Map<SystemInjecteeImpl,java.lang.Object> |
ClazzCreator.resolveAllDependencies(ServiceHandle<?> root) |
void |
Collector.throwIfErrors()
This method will throw if the list of throwables associated with this
collector is not empty
|
Constructor and Description |
---|
ErrorInformationImpl(ErrorType errorType,
Descriptor descriptor,
Injectee injectee,
MultiException exception) |
ErrorResults(ActiveDescriptor<?> descriptor,
Injectee injectee,
MultiException me) |
Modifier and Type | Method and Description |
---|---|
void |
ErrorServiceImpl.onFailure(ErrorInformation ei) |