Uses of Interface
org.glassfish.hk2.api.ServiceHandle
Packages that use ServiceHandle
-
Uses of ServiceHandle in org.glassfish.hk2.api
Methods in org.glassfish.hk2.api that return ServiceHandleModifier and TypeMethodDescriptionIterableProvider.getHandle()Rather than getting the service directly with get (in which case the returned service cannot be disposed of) this method will instead return a service handle for the current best service.<T> ServiceHandle<T>ServiceLocator.getServiceHandle(Class<T> contractOrImpl, Annotation... qualifiers) Gets aServiceHandlethat can be used to get and destroy the service that best matches the given criteria<T> ServiceHandle<T>ServiceLocator.getServiceHandle(Class<T> contractOrImpl, String name, Annotation... qualifiers) Gets aServiceHandlethat can be used to get and destroy the service that best matches the given criteria<T> ServiceHandle<T>ServiceLocator.getServiceHandle(Type contractOrImpl, Annotation... qualifiers) Gets aServiceHandlethat can be used to get and destroy the service that best matches the given criteria<T> ServiceHandle<T>ServiceLocator.getServiceHandle(Type contractOrImpl, String name, Annotation... qualifiers) Gets aServiceHandlethat can be used to get and destroy the service that best matches the given criteria<T> ServiceHandle<T>ServiceLocator.getServiceHandle(ActiveDescriptor<T> activeDescriptor) Gets aServiceHandlethat can be used to get and destroy the service described by theActiveDescriptor.<T> ServiceHandle<T>ServiceLocator.getServiceHandle(ActiveDescriptor<T> activeDescriptor, Injectee injectee) Gets aServiceHandlethat can be used to get and destroy the service described by theActiveDescriptor.Methods in org.glassfish.hk2.api that return types with arguments of type ServiceHandleModifier and TypeMethodDescriptionList<ServiceHandle<?>>ServiceLocator.getAllServiceHandles(Annotation qualifier, Annotation... qualifiers) Gets a list ofServiceHandlethat can be used to get and destroy services associated with descriptors that match the provided criteria<T> List<ServiceHandle<T>>ServiceLocator.getAllServiceHandles(Class<T> contractOrImpl, Annotation... qualifiers) Gets a list ofServiceHandlethat can be used to get and destroy services associated with descriptors that match the provided criteriaList<ServiceHandle<?>>ServiceLocator.getAllServiceHandles(Type contractOrImpl, Annotation... qualifiers) Gets a list ofServiceHandlethat can be used to get and destroy services associated with descriptors that match the provided criteriaList<ServiceHandle<?>>ServiceLocator.getAllServiceHandles(Filter searchCriteria) Gets a list ofServiceHandlewhoseActiveDescriptors match the supplied filter.List<ServiceHandle<?>>ServiceHandle.getSubHandles()Returns a list of subordinate subhandles to this root handleIterableProvider.handleIterator()This version of iterator returns an iterator of ServiceHandles rather than returning the services (which then have no way to be properly destroyed)Methods in org.glassfish.hk2.api with parameters of type ServiceHandleModifier and TypeMethodDescriptionServiceLocator.assistedInject(Object injectMe, Method method, ServiceHandle<?> root, MethodParameter... params) This will invoke the given method on the given object.ActiveDescriptor.create(ServiceHandle<?> root) Creates an instance of the ActiveDescriptor.<U> UContext.findOrCreate(ActiveDescriptor<U> activeDescriptor, ServiceHandle<?> root) Creates a contextual instance of this ActiveDescriptor by calling its create method if there is no other matching contextual instance.<T> TServiceLocator.getService(ActiveDescriptor<T> activeDescriptor, ServiceHandle<?> root) Deprecated.<T> TServiceLocator.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 ofInjectionResolver.resolve(Injectee, ServiceHandle).InjectionResolver.resolve(Injectee injectee, ServiceHandle<?> root) This method will return the object that should be injected into the given injection point. -
Uses of ServiceHandle in org.glassfish.hk2.internal
Methods in org.glassfish.hk2.internal that return ServiceHandleMethods in org.glassfish.hk2.internal with parameters of type ServiceHandleModifier and TypeMethodDescriptionConstantActiveDescriptor.create(ServiceHandle<?> root) <U> UInheritableThreadContext.findOrCreate(ActiveDescriptor<U> activeDescriptor, ServiceHandle<?> root) <U> UPerThreadContext.findOrCreate(ActiveDescriptor<U> activeDescriptor, ServiceHandle<?> root) Constructors in org.glassfish.hk2.internal with parameters of type ServiceHandle -
Uses of ServiceHandle in org.glassfish.hk2.utilities
Methods in org.glassfish.hk2.utilities that return ServiceHandleModifier and TypeMethodDescriptionstatic <T> ServiceHandle<T>BuilderHelper.createConstantServiceHandle(T obj) Creates a ServiceHandle that will always return the given object from thegetService()method.ContextualInput.getRoot()Returns theServiceHandleroot associated with this contextual creationMethods in org.glassfish.hk2.utilities with parameters of type ServiceHandleModifier and TypeMethodDescriptionAliasDescriptor.create(ServiceHandle<?> root) <U> UImmediateContext.findOrCreate(ActiveDescriptor<U> activeDescriptor, ServiceHandle<?> root) static StringServiceLocatorUtilities.getOneMetadataField(ServiceHandle<?> h, String field) Gets one value from a metadata field from the given service handleConstructors in org.glassfish.hk2.utilities with parameters of type ServiceHandleModifierConstructorDescriptionContextualInput(ActiveDescriptor<T> descriptor, ServiceHandle<?> root) The inputs from theContext.findOrCreate(ActiveDescriptor, ServiceHandle)method
ServiceLocator.getService(ActiveDescriptor, ServiceHandle, Injectee)