Uses of Interface
org.glassfish.hk2.api.ServiceLocator
Packages that use ServiceLocator
Package
Description
-
Uses of ServiceLocator in org.glassfish.hk2.api
Methods in org.glassfish.hk2.api that return ServiceLocatorModifier and TypeMethodDescriptionabstract ServiceLocatorCreates (or finds) a ServiceLocator.abstract ServiceLocatorServiceLocatorFactory.create(String name, ServiceLocator parent) Creates or finds a ServiceLocator.abstract ServiceLocatorServiceLocatorFactory.create(String name, ServiceLocator parent, ServiceLocatorGenerator generator) Creates or finds a ServiceLocator.abstract ServiceLocatorServiceLocatorFactory.create(String name, ServiceLocator parent, ServiceLocatorGenerator generator, ServiceLocatorFactory.CreatePolicy policy) Creates a ServiceLocator.abstract ServiceLocatorFinds the ServiceLocator with this nameServiceLocator.getParent()Gets the parent service locator for this locatorMethods in org.glassfish.hk2.api with parameters of type ServiceLocatorModifier and TypeMethodDescriptionabstract ServiceLocatorServiceLocatorFactory.create(String name, ServiceLocator parent) Creates or finds a ServiceLocator.abstract ServiceLocatorServiceLocatorFactory.create(String name, ServiceLocator parent, ServiceLocatorGenerator generator) Creates or finds a ServiceLocator.abstract ServiceLocatorServiceLocatorFactory.create(String name, ServiceLocator parent, ServiceLocatorGenerator generator, ServiceLocatorFactory.CreatePolicy policy) Creates a ServiceLocator.abstract voidServiceLocatorFactory.destroy(ServiceLocator locator) Removes the given ServiceLocatorvoidServiceLocatorListener.locatorAdded(ServiceLocator added) This method is called whenever a ServiceLocator has been added to the set of ServiceLocators.voidServiceLocatorListener.locatorDestroyed(ServiceLocator destroyed) This method is called whenever a ServiceLocator will be removed from the set of ServiceLocators.PopulatorPostProcessor.process(ServiceLocator serviceLocator, DescriptorImpl descriptorImpl) This method can be used to alter the descriptor read in.Method parameters in org.glassfish.hk2.api with type arguments of type ServiceLocatorModifier and TypeMethodDescriptionvoidServiceLocatorListener.initialize(Set<ServiceLocator> initialLocators) This method returns the complete list of named service locators at the time that this listener is registered. -
Uses of ServiceLocator in org.glassfish.hk2.extension
Methods in org.glassfish.hk2.extension that return ServiceLocatorModifier and TypeMethodDescriptionServiceLocatorGenerator.create(String name, ServiceLocator parent) Creates the ServiceLocator that will be used to generate the ServiceLocatorsMethods in org.glassfish.hk2.extension with parameters of type ServiceLocatorModifier and TypeMethodDescriptionServiceLocatorGenerator.create(String name, ServiceLocator parent) Creates the ServiceLocator that will be used to generate the ServiceLocators -
Uses of ServiceLocator in org.glassfish.hk2.internal
Methods in org.glassfish.hk2.internal that return ServiceLocatorModifier and TypeMethodDescriptionServiceLocatorFactoryImpl.create(String name, ServiceLocator parent) ServiceLocatorFactoryImpl.create(String name, ServiceLocator parent, ServiceLocatorGenerator generator) ServiceLocatorFactoryImpl.create(String name, ServiceLocator parent, ServiceLocatorGenerator generator, ServiceLocatorFactory.CreatePolicy policy) Methods in org.glassfish.hk2.internal with parameters of type ServiceLocatorModifier and TypeMethodDescriptionServiceLocatorFactoryImpl.create(String name, ServiceLocator parent) ServiceLocatorFactoryImpl.create(String name, ServiceLocator parent, ServiceLocatorGenerator generator) ServiceLocatorFactoryImpl.create(String name, ServiceLocator parent, ServiceLocatorGenerator generator, ServiceLocatorFactory.CreatePolicy policy) voidServiceLocatorFactoryImpl.destroy(ServiceLocator locator) -
Uses of ServiceLocator in org.glassfish.hk2.utilities
Methods in org.glassfish.hk2.utilities that return ServiceLocatorModifier and TypeMethodDescriptionstatic ServiceLocatorThis method will create or find a ServiceLocator with the given name and bind all of the binders given together in a single config transaction.static ServiceLocatorThis method will create or find a ServiceLocator with the name "default" and bind all of the binders given together in a single config transaction.static ServiceLocatorServiceLocatorUtilities.createAndPopulateServiceLocator()This method is often the first line of a stand-alone client that wishes to use HK2.static ServiceLocatorServiceLocatorUtilities.createAndPopulateServiceLocator(String name) This method is often the first line of a stand-alone client that wishes to use HK2.Methods in org.glassfish.hk2.utilities with parameters of type ServiceLocatorModifier and TypeMethodDescriptionstatic List<ActiveDescriptor<?>>ServiceLocatorUtilities.addClasses(ServiceLocator locator, boolean idempotent, Class<?>... toAdd) It is very often the case that one wishes to add classes that hk2 will automatically analyze for contracts and qualifiers to a service locator.static List<ActiveDescriptor<?>>ServiceLocatorUtilities.addClasses(ServiceLocator locator, Class<?>... toAdd) It is very often the case that one wishes to add classes that hk2 will automatically analyze for contracts and qualifiers to a service locator.static List<FactoryDescriptors>ServiceLocatorUtilities.addFactoryConstants(ServiceLocator locator, Factory<?>... constants) This method adds factory constants to the given locator.static List<FactoryDescriptors>ServiceLocatorUtilities.addFactoryDescriptors(ServiceLocator locator, boolean requiresDeepCopy, FactoryDescriptors... factories) Adds the given factory descriptors to the service locatorstatic List<FactoryDescriptors>ServiceLocatorUtilities.addFactoryDescriptors(ServiceLocator locator, FactoryDescriptors... factories) Adds the given factory descriptors to the service locatorstatic <T> ActiveDescriptor<T>ServiceLocatorUtilities.addOneConstant(ServiceLocator locator, Object constant) This method adds one existing object to the given service locator.static <T> ActiveDescriptor<T>ServiceLocatorUtilities.addOneConstant(ServiceLocator locator, Object constant, String name, Type... contracts) This method adds one existing object to the given service locator.static <T> ActiveDescriptor<T>ServiceLocatorUtilities.addOneDescriptor(ServiceLocator locator, Descriptor descriptor) It is very often the case that one wishes to add a single descriptor to a service locator.static <T> ActiveDescriptor<T>ServiceLocatorUtilities.addOneDescriptor(ServiceLocator locator, Descriptor descriptor, boolean requiresDeepCopy) It is very often the case that one wishes to add a single descriptor to a service locator.static voidServiceLocatorUtilities.bind(ServiceLocator locator, Binder... binders) This method will bind all of the binders given together in a single config transaction.static DynamicConfigurationServiceLocatorUtilities.createDynamicConfiguration(ServiceLocator locator) This method returns aDynamicConfigurationfor use with adding and removing services to the givenServiceLocator.static voidServiceLocatorUtilities.dumpAllDescriptors(ServiceLocator locator) Dumps all descriptors in this ServiceLocator to stderrstatic voidServiceLocatorUtilities.dumpAllDescriptors(ServiceLocator locator, PrintStream output) Dumps all descriptors in this ServiceLocator to the given PrintStreamstatic voidServiceLocatorUtilities.enableGreedyResolution(ServiceLocator locator) Enables greedy service resolution in this service locator by adding theGreedyResolverinto the service locator.static voidServiceLocatorUtilities.enableImmediateScope(ServiceLocator locator) This method will add the ability to use theImmediatescope to the given locator.static ImmediateControllerServiceLocatorUtilities.enableImmediateScopeSuspended(ServiceLocator locator) This method will add the ability to use theImmediatescope to the given locator.static voidServiceLocatorUtilities.enableInheritableThreadScope(ServiceLocator locator) This method will add the ability to use theInheritableThreadscope to the given locator.static voidServiceLocatorUtilities.enableLookupExceptions(ServiceLocator locator) This method will cause lookup operations to throw exceptions when exceptions are encountered in underlying operations such as classloading.static voidServiceLocatorUtilities.enablePerThreadScope(ServiceLocator locator) This method will add the ability to use thePerThreadscope to the given locator.static <T> ActiveDescriptor<T>ServiceLocatorUtilities.findOneDescriptor(ServiceLocator locator, Descriptor descriptor) Finds a descriptor in the given service locator.static <T> TServiceLocatorUtilities.findOrCreateService(ServiceLocator locator, Class<T> type, 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.static <T> TServiceLocatorUtilities.getService(ServiceLocator locator, String className) Returns the best service matching the passed in fully qualified class name of the servicestatic <T> TServiceLocatorUtilities.getService(ServiceLocator locator, Descriptor descriptor) Returns the service in this service locator given the current descriptor.ClassLoaderPostProcessor.process(ServiceLocator serviceLocator, DescriptorImpl descriptorImpl) DuplicatePostProcessor.process(ServiceLocator serviceLocator, DescriptorImpl descriptorImpl) static voidServiceLocatorUtilities.removeFilter(ServiceLocator locator, Filter filter) Removes all the descriptors from the given locator that match the given filterstatic voidServiceLocatorUtilities.removeFilter(ServiceLocator locator, Filter filter, boolean includeAliasDescriptors) Removes all the descriptors from the given locator that match the given filterstatic voidServiceLocatorUtilities.removeOneDescriptor(ServiceLocator locator, Descriptor descriptor) This method will attempt to remove descriptors matching the passed in descriptor from the given locator.static voidServiceLocatorUtilities.removeOneDescriptor(ServiceLocator locator, Descriptor descriptor, boolean includeAliasDescriptors) This method will attempt to remove descriptors matching the passed in descriptor from the given locator.Constructors in org.glassfish.hk2.utilities with parameters of type ServiceLocatorModifierConstructorDescriptionAliasDescriptor(ServiceLocator locator, ActiveDescriptor<T> descriptor, String contract, String name) Construct an AliasDescriptor.