Uses of Interface
org.osgi.framework.ServiceReference
Packages that use ServiceReference
Package
Description
Framework Package Version 1.8.
Framework Service Hooks Package Version 1.1.
Tracker Package Version 1.5.
-
Uses of ServiceReference in org.apache.felix.framework
Classes in org.apache.felix.framework that implement ServiceReferenceModifier and TypeClassDescription(package private) class
Fields in org.apache.felix.framework declared as ServiceReferenceModifier and TypeFieldDescriptionprivate ServiceReference
Logger.m_logRef
private final ServiceReference
<S> BundleContextImpl.ServiceObjectsImpl.m_ref
ServiceRegistry.UsageCount.m_ref
Fields in org.apache.felix.framework with type parameters of type ServiceReferenceModifier and TypeFieldDescriptionprivate final Map
<Class<?>, Set<ServiceReference<?>>> ServiceRegistry.m_allHooks
private final WeakHashMap
<ServiceReference<?>, ServiceReference<?>> ServiceRegistry.m_blackList
private final WeakHashMap
<ServiceReference<?>, ServiceReference<?>> ServiceRegistry.m_blackList
(package private) final Map
<ServiceReference<ResolverHookFactory>, ResolverHook> StatefulResolver.ResolverHookRecord.m_resolveHookMap
Methods in org.apache.felix.framework that return ServiceReferenceModifier and TypeMethodDescription(package private) ServiceReference[]
Felix.getAllowedServiceReferences
(BundleImpl bundle, String className, String expr, boolean checkAssignable) Retrieves Array ofServiceReference
objects based on calling bundle, service class name, optional filter expression, and optionally filters further on the version.ServiceReference<?>[]
BundleContextImpl.getAllServiceReferences
(String clazz, String filter) private ServiceReference
BundleContextImpl.getBestServiceReference
(ServiceReference[] refs) (package private) ServiceReference[]
Felix.getBundleRegisteredServices
(BundleImpl bundle) (package private) ServiceReference[]
Felix.getBundleServicesInUse
(Bundle bundle) ServiceRegistrationImpl.getReference()
BundleImpl.getRegisteredServices()
Returns an array of service references corresponding to the bundle's registered services.ServiceReference<?>[]
ServiceRegistry.getRegisteredServices
(Bundle bundle) <S> ServiceReference
<S> BundleContextImpl.getServiceReference
(Class<S> clazz) BundleContextImpl.getServiceReference
(String clazz) BundleContextImpl.ServiceObjectsImpl.getServiceReference()
ServiceReference<?>[]
BundleContextImpl.getServiceReferences
(String clazz, String filter) (package private) ServiceReference[]
Felix.getServiceReferences
(BundleImpl bundle, String className, String expr, boolean checkAssignable) Retrieves an array ofServiceReference
objects based on calling bundle, service class name, and filter expression.BundleImpl.getServicesInUse()
ServiceReference<?>[]
ServiceRegistry.getServicesInUse
(Bundle bundle) Methods in org.apache.felix.framework that return types with arguments of type ServiceReferenceModifier and TypeMethodDescriptionprivate static <S> SortedSet
<ServiceReference<S>> ServiceRegistry.asTypedSortedSet
(SortedSet<ServiceReference<?>> ss) <S> Set
<ServiceReference<S>> <S> Set
<ServiceReference<S>> (package private) Set
<ServiceReference<ResolverHookFactory>> StatefulResolver.ResolverHookRecord.getResolverHookRefs()
<S> Collection
<ServiceReference<S>> BundleContextImpl.getServiceReferences
(Class<S> clazz, String filter) Methods in org.apache.felix.framework with parameters of type ServiceReferenceModifier and TypeMethodDescriptionprivate void
Logger._log
(Bundle bundle, ServiceReference sr, int level, String msg, Throwable throwable) private void
Logger._logReflectively
(Object[] logger, ServiceReference sr, int level, String msg, Throwable throwable) private void
ServiceRegistry.addHooks
(String[] classNames, Object svcObj, ServiceReference<?> ref) private ServiceRegistry.UsageCount
ServiceRegistry.addUsageCount
(Bundle bundle, ServiceReference<?> ref, boolean isPrototype) Utility method to update the specified bundle's usage count array to include the specified service.(package private) void
Felix.blackListHook
(ServiceReference sr) (package private) void
ServiceRegistry.blackListHook
(ServiceReference<?> sr) private static ServiceReferenceDTO
DTOFactory.createServiceReferenceDTO
(ServiceReference<?> svc) protected void
Logger.doLog
(Bundle bundle, ServiceReference sr, int level, String msg, Throwable throwable) private void
ServiceRegistry.flushUsageCount
(Bundle bundle, ServiceReference<?> ref, ServiceRegistry.UsageCount uc) Utility method to flush the specified bundle's usage count for the specified service reference.private ServiceReference
BundleContextImpl.getBestServiceReference
(ServiceReference[] refs) <S> S
BundleContextImpl.getService
(ServiceReference<S> ref) (package private) <S> S
Felix.getService
(Bundle bundle, ServiceReference<S> ref, boolean isPrototype) <S> S
ServiceRegistry.getService
(Bundle bundle, ServiceReference<S> ref, boolean isPrototype) <S> ServiceObjects
<S> BundleContextImpl.getServiceObjects
(ServiceReference<S> ref) private ServiceRegistry.UsageCount
ServiceRegistry.getUsageCount
(Bundle bundle, ServiceReference<?> ref, Object svcObj) Utility method to retrieve the specified bundle's usage count for the specified service reference.Bundle[]
ServiceRegistry.getUsingBundles
(ServiceReference<?> ref) (package private) boolean
Felix.isHookBlackListed
(ServiceReference sr) (package private) boolean
ServiceRegistry.isHookBlackListed
(ServiceReference<?> sr) final void
Logger.log
(ServiceReference sr, int level, String msg) final void
Logger.log
(ServiceReference sr, int level, String msg, Throwable throwable) boolean
FilterImpl.match
(ServiceReference sr) private void
ServiceRegistry.removeHook
(ServiceReference<?> ref) boolean
BundleContextImpl.ungetService
(ServiceReference<?> ref) (package private) boolean
Felix.ungetService
(Bundle bundle, ServiceReference ref, Object srvObj) boolean
ServiceRegistry.ungetService
(Bundle bundle, ServiceReference<?> ref, Object svcObj) private void
ServiceRegistry.updateHook
(ServiceReference<?> ref) Method parameters in org.apache.felix.framework with type arguments of type ServiceReferenceModifier and TypeMethodDescriptionprivate static <S> SortedSet
<ServiceReference<S>> ServiceRegistry.asTypedSortedSet
(SortedSet<ServiceReference<?>> ss) protected void
BundleWiringImpl.BundleClassLoader.callWovenClassListeners
(Felix felix, Set<ServiceReference<WovenClassListener>> wovenClassListeners, WovenClass wovenClass) (package private) Class
BundleWiringImpl.BundleClassLoader.defineClass
(Felix felix, Set<ServiceReference<WovenClassListener>> wovenClassListeners, WovenClassImpl wci, String name, Class clazz, byte[] bytes, Content content, String pkgName, Object lock) private <S> S
URLHandlersActivator.get
(Set<ServiceReference<S>> hooks, String key, String value) (package private) void
BundleWiringImpl.BundleClassLoader.transformClass
(Felix felix, WovenClassImpl wci, Set<ServiceReference<WeavingHook>> hooks, Set<ServiceReference<WovenClassListener>> wovenClassListeners, String name, byte[] bytes) Constructors in org.apache.felix.framework with parameters of type ServiceReferenceModifierConstructorDescriptionConstructor parameters in org.apache.felix.framework with type arguments of type ServiceReferenceModifierConstructorDescription(package private)
ResolverHookRecord
(Map<ServiceReference<ResolverHookFactory>, ResolverHook> resolveHookMap, Collection<BundleRevision> brWhiteList) The map passed in must be of an ordered type, so that the iteration order over the values is predictable. -
Uses of ServiceReference in org.apache.felix.framework.util
Methods in org.apache.felix.framework.util with parameters of type ServiceReferenceModifier and TypeMethodDescriptionstatic boolean
Util.isServiceAssignable
(Bundle requester, ServiceReference ref) This method determines if the requesting bundle is able to cast the specified service reference based on class visibility rules of the underlying modules.Method parameters in org.apache.felix.framework.util with type arguments of type ServiceReferenceModifier and TypeMethodDescriptionvoid
SecureAction.invokeServiceFindHook
(FindHook fh, BundleContext context, String name, String filter, boolean allServices, Collection<ServiceReference<?>> references) -
Uses of ServiceReference in org.osgi.framework
Fields in org.osgi.framework declared as ServiceReferenceModifier and TypeFieldDescriptionprivate final ServiceReference
<?> FrameworkUtil.ServiceReferenceMap.reference
private final ServiceReference
<?> ServiceEvent.reference
Reference to the service that had a change occur in its lifecycle.private final ServiceReference
<?> ServicePermission.Properties.service
(package private) final ServiceReference
<?> ServicePermission.service
The service used by this ServicePermission.Methods in org.osgi.framework that return ServiceReferenceModifier and TypeMethodDescriptionServiceReference<?>[]
BundleContext.getAllServiceReferences
(String clazz, String filter) Returns an array ofServiceReference
objects.ServiceRegistration.getReference()
Returns aServiceReference
object for a service being registered.ServiceReference<?>[]
Bundle.getRegisteredServices()
Returns this bundle'sServiceReference
list for all services it has registered ornull
if this bundle has no registered services.<S> ServiceReference
<S> BundleContext.getServiceReference
(Class<S> clazz) Returns aServiceReference
object for a service that implements and was registered under the name of the specified class.BundleContext.getServiceReference
(String clazz) Returns aServiceReference
object for a service that implements and was registered under the specified class.ServiceEvent.getServiceReference()
Returns a reference to the service that had a change occur in its lifecycle.ServiceObjects.getServiceReference()
Returns theServiceReference
for the service associated with thisServiceObjects
object.ServiceReference<?>[]
BundleContext.getServiceReferences
(String clazz, String filter) Returns an array ofServiceReference
objects.ServiceReference<?>[]
Bundle.getServicesInUse()
Returns this bundle'sServiceReference
list for all services it is using or returnsnull
if this bundle is not using any services.Methods in org.osgi.framework that return types with arguments of type ServiceReferenceModifier and TypeMethodDescription<S> Collection
<ServiceReference<S>> BundleContext.getServiceReferences
(Class<S> clazz, String filter) Returns a collection ofServiceReference
objects.Methods in org.osgi.framework with parameters of type ServiceReferenceModifier and TypeMethodDescriptionprivate static String
ServicePermission.createName
(ServiceReference<?> reference) Create a permission name from a ServiceReference<S> S
BundleContext.getService
(ServiceReference<S> reference) Returns the service object for the service referenced by the specifiedServiceReference
object.<S> ServiceObjects
<S> BundleContext.getServiceObjects
(ServiceReference<S> reference) Returns theServiceObjects
object for the service referenced by the specifiedServiceReference
object.boolean
Filter.match
(ServiceReference<?> reference) Filter using a service's properties.boolean
FrameworkUtil.FilterImpl.match
(ServiceReference<?> reference) Filter using a service's properties.boolean
BundleContext.ungetService
(ServiceReference<?> reference) Releases the service object for the service referenced by the specifiedServiceReference
object.Constructors in org.osgi.framework with parameters of type ServiceReferenceModifierConstructorDescription(package private)
Properties
(Map<String, Object> properties, ServiceReference<?> service) ServiceEvent
(int type, ServiceReference<?> reference) Creates a new service event object.ServicePermission
(ServiceReference<?> reference, String actions) Creates a new requestedServicePermission
object to be used by code that must performcheckPermission
for theget
action.(package private)
ServiceReferenceMap
(ServiceReference<?> reference) -
Uses of ServiceReference in org.osgi.framework.hooks.service
Method parameters in org.osgi.framework.hooks.service with type arguments of type ServiceReferenceModifier and TypeMethodDescriptionvoid
FindHook.find
(BundleContext context, String name, String filter, boolean allServices, Collection<ServiceReference<?>> references) Find hook method. -
Uses of ServiceReference in org.osgi.util.tracker
Fields in org.osgi.util.tracker declared as ServiceReferenceModifier and TypeFieldDescriptionprivate ServiceReference
<S> ServiceTracker.cachedReference
Cached ServiceReference for getServiceReference.private final ServiceReference
<S> ServiceTracker.trackReference
Reference to be tracked.Methods in org.osgi.util.tracker that return ServiceReferenceModifier and TypeMethodDescriptionprivate ServiceReference<S>[]
ServiceTracker.getInitialReferences
(boolean trackAllServices, String className, String filterString) Returns the list of initialServiceReference
s that will be tracked by thisServiceTracker
.ServiceTracker.getServiceReference()
Returns aServiceReference
for one of the services being tracked by thisServiceTracker
.ServiceTracker.getServiceReferences()
Return an array ofServiceReference
s for all services being tracked by thisServiceTracker
.Methods in org.osgi.util.tracker that return types with arguments of type ServiceReferenceModifier and TypeMethodDescriptionServiceTracker.getTracked()
Return aSortedMap
of theServiceReference
s and service objects for all services being tracked by thisServiceTracker
.Methods in org.osgi.util.tracker with parameters of type ServiceReferenceModifier and TypeMethodDescriptionServiceTracker.addingService
(ServiceReference<S> reference) Default implementation of theServiceTrackerCustomizer.addingService
method.ServiceTrackerCustomizer.addingService
(ServiceReference<S> reference) A service is being added to theServiceTracker
.(package private) final T
ServiceTracker.Tracked.customizerAdding
(ServiceReference<S> item, ServiceEvent related) Call the specific customizer adding method.(package private) final void
ServiceTracker.Tracked.customizerModified
(ServiceReference<S> item, ServiceEvent related, T object) Call the specific customizer modified method.(package private) final void
ServiceTracker.Tracked.customizerRemoved
(ServiceReference<S> item, ServiceEvent related, T object) Call the specific customizer removed method.ServiceTracker.getService
(ServiceReference<S> reference) Returns the service object for the specifiedServiceReference
if the specified referenced service is being tracked by thisServiceTracker
.void
ServiceTracker.modifiedService
(ServiceReference<S> reference, T service) Default implementation of theServiceTrackerCustomizer.modifiedService
method.void
ServiceTrackerCustomizer.modifiedService
(ServiceReference<S> reference, T service) A service tracked by theServiceTracker
has been modified.void
ServiceTracker.remove
(ServiceReference<S> reference) Remove a service from thisServiceTracker
.void
ServiceTracker.removedService
(ServiceReference<S> reference, T service) Default implementation of theServiceTrackerCustomizer.removedService
method.void
ServiceTrackerCustomizer.removedService
(ServiceReference<S> reference, T service) A service tracked by theServiceTracker
has been removed.Constructors in org.osgi.util.tracker with parameters of type ServiceReferenceModifierConstructorDescriptionServiceTracker
(BundleContext context, ServiceReference<S> reference, ServiceTrackerCustomizer<S, T> customizer) Create aServiceTracker
on the specifiedServiceReference
.