Package | Description |
---|---|
org.osgi.framework |
Framework Package Version 1.10.
|
org.osgi.framework.hooks.service |
Framework Service Hooks Package Version 1.1.
|
org.osgi.service.log |
Log Service Package Version 1.5.
|
org.osgi.util.tracker |
Tracker Package Version 1.5.
|
Modifier and Type | Method and Description |
---|---|
ServiceReference<?>[] |
BundleContext.getAllServiceReferences(java.lang.String clazz,
java.lang.String filter)
Returns an array of
ServiceReference objects. |
ServiceReference<S> |
ServiceRegistration.getReference()
Returns a
ServiceReference object for a service being registered. |
ServiceReference<?>[] |
Bundle.getRegisteredServices()
Returns this bundle's
ServiceReference list for all services it
has registered or null if this bundle has no registered services. |
ServiceReference<?> |
ServiceEvent.getServiceReference()
Returns a reference to the service that had a change occur in its
lifecycle.
|
ServiceReference<S> |
ServiceObjects.getServiceReference()
Returns the
ServiceReference for the service associated with this
ServiceObjects object. |
<S> ServiceReference<S> |
BundleContext.getServiceReference(java.lang.Class<S> clazz)
Returns a
ServiceReference object for a service that implements
and was registered under the name of the specified class. |
ServiceReference<?> |
BundleContext.getServiceReference(java.lang.String clazz)
Returns a
ServiceReference object for a service that implements
and was registered under the specified class. |
ServiceReference<?>[] |
BundleContext.getServiceReferences(java.lang.String clazz,
java.lang.String filter)
Returns an array of
ServiceReference objects. |
ServiceReference<?>[] |
Bundle.getServicesInUse()
Returns this bundle's
ServiceReference list for all services it
is using or returns null if this bundle is not using any
services. |
Modifier and Type | Method and Description |
---|---|
<S> java.util.Collection<ServiceReference<S>> |
BundleContext.getServiceReferences(java.lang.Class<S> clazz,
java.lang.String filter)
Returns a collection of
ServiceReference objects. |
Modifier and Type | Method and Description |
---|---|
<S> S |
BundleContext.getService(ServiceReference<S> reference)
Returns the service object for the service referenced by the specified
ServiceReference object. |
<S> ServiceObjects<S> |
BundleContext.getServiceObjects(ServiceReference<S> reference)
Returns the
ServiceObjects object for the service referenced by
the specified ServiceReference object. |
boolean |
Filter.match(ServiceReference<?> reference)
Filter using a service's properties.
|
boolean |
BundleContext.ungetService(ServiceReference<?> reference)
Releases the service object for the service referenced by the specified
ServiceReference object. |
Constructor and Description |
---|
ServiceEvent(int type,
ServiceReference<?> reference)
Creates a new service event object.
|
ServicePermission(ServiceReference<?> reference,
java.lang.String actions)
Creates a new requested
ServicePermission object to be used by
code that must perform checkPermission for the get
action. |
Modifier and Type | Method and Description |
---|---|
void |
FindHook.find(BundleContext context,
java.lang.String name,
java.lang.String filter,
boolean allServices,
java.util.Collection<ServiceReference<?>> references)
Find hook method.
|
Modifier and Type | Method and Description |
---|---|
ServiceReference<?> |
LogEntry.getServiceReference()
Returns the
ServiceReference object for the service associated
with this LogEntry object. |
Modifier and Type | Method and Description |
---|---|
void |
LogService.log(ServiceReference<?> sr,
int level,
java.lang.String message)
Deprecated.
Since 1.4. Replaced by
Logger . See
LoggerFactory . |
void |
LogService.log(ServiceReference<?> sr,
int level,
java.lang.String message,
java.lang.Throwable exception)
Deprecated.
Since 1.4. Replaced by
Logger . See
LoggerFactory . |
Modifier and Type | Method and Description |
---|---|
ServiceReference<S> |
ServiceTracker.getServiceReference()
Returns a
ServiceReference for one of the services being tracked
by this ServiceTracker . |
ServiceReference<S>[] |
ServiceTracker.getServiceReferences()
Return an array of
ServiceReference s for all services being
tracked by this ServiceTracker . |
Modifier and Type | Method and Description |
---|---|
java.util.SortedMap<ServiceReference<S>,T> |
ServiceTracker.getTracked()
Return a
SortedMap of the ServiceReference s and service
objects for all services being tracked by this ServiceTracker . |
Modifier and Type | Method and Description |
---|---|
T |
ServiceTracker.addingService(ServiceReference<S> reference)
Default implementation of the
ServiceTrackerCustomizer.addingService method. |
T |
ServiceTrackerCustomizer.addingService(ServiceReference<S> reference)
A service is being added to the
ServiceTracker . |
T |
ServiceTracker.getService(ServiceReference<S> reference)
Returns the service object for the specified
ServiceReference if
the specified referenced service is being tracked by this
ServiceTracker . |
void |
ServiceTracker.modifiedService(ServiceReference<S> reference,
T service)
Default implementation of the
ServiceTrackerCustomizer.modifiedService method. |
void |
ServiceTrackerCustomizer.modifiedService(ServiceReference<S> reference,
T service)
A service tracked by the
ServiceTracker has been modified. |
void |
ServiceTracker.remove(ServiceReference<S> reference)
Remove a service from this
ServiceTracker . |
void |
ServiceTracker.removedService(ServiceReference<S> reference,
T service)
Default implementation of the
ServiceTrackerCustomizer.removedService method. |
void |
ServiceTrackerCustomizer.removedService(ServiceReference<S> reference,
T service)
A service tracked by the
ServiceTracker has been removed. |
Constructor and Description |
---|
ServiceTracker(BundleContext context,
ServiceReference<S> reference,
ServiceTrackerCustomizer<S,T> customizer)
Create a
ServiceTracker on the specified ServiceReference
. |
Copyright © OSGi Alliance (2000, 2020). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0