Definition at line 55 of file Services.java.
Package Functions | |
ServiceRegistration | register (BundleImpl bundle, String[] classes, Object service, Dictionary properties) |
Register a service in the framework wide register. | |
synchronized ServiceReference | get (BundleImpl bundle, String clazz) |
Get a service implementing a certain class. | |
synchronized ServiceReference[] | get (String clazz, String filter, BundleImpl bundle, boolean doAssignableToTest) throws InvalidSyntaxException |
Get all services implementing a certain class and then filter these with a property filter. | |
synchronized void | removeServiceRegistration (ServiceRegistrationImpl sr) |
Remove a registered service. | |
synchronized Set | getRegisteredByBundle (Bundle b) |
Get all services that a bundle has registered. | |
synchronized Set | getUsedByBundle (Bundle b) |
Get all services that a bundle uses. |
ServiceRegistration org.knopflerfish.framework.Services.register | ( | BundleImpl | bundle, | |
String[] | classes, | |||
Object | service, | |||
Dictionary | properties | |||
) | [package] |
Register a service in the framework wide register.
bundle | The bundle registering the service. | |
classes | The class names under which the service can be located. | |
service | The service object. | |
properties | The properties for this service. |
java.lang.IllegalArgumentException | If one of the following is true:
|
Definition at line 94 of file Services.java.
References org.knopflerfish.framework.PermissionOps.checkRegisterServicePerm(), and org.osgi.framework.ServiceRegistration.getReference().
Referenced by org.knopflerfish.framework.Framework.Framework(), and org.knopflerfish.framework.BundleContextImpl.registerService().
synchronized ServiceReference org.knopflerfish.framework.Services.get | ( | BundleImpl | bundle, | |
String | clazz | |||
) | [package] |
Get a service implementing a certain class.
bundle | bundle requesting reference | |
clazz | The class name of requested service. |
Definition at line 177 of file Services.java.
References org.osgi.framework.ServiceReference.isAssignableTo().
Referenced by org.knopflerfish.framework.BundleContextImpl.getAllServiceReferences(), org.knopflerfish.framework.BundleContextImpl.getServiceReference(), and org.knopflerfish.framework.BundleContextImpl.getServiceReferences().
synchronized ServiceReference [] org.knopflerfish.framework.Services.get | ( | String | clazz, | |
String | filter, | |||
BundleImpl | bundle, | |||
boolean | doAssignableToTest | |||
) | throws InvalidSyntaxException [package] |
Get all services implementing a certain class and then filter these with a property filter.
clazz | The class name of requested service. | |
filter | The property filter. | |
bundle | bundle requesting reference. can be null if doAssignableToTest is false (this is not an interface class so don't check) | |
isAssignableToTest | whether to if the bundle that registered the service referenced by this ServiceReference and the specified bundle are both wired to same source for the registration class. |
Definition at line 226 of file Services.java.
References org.knopflerfish.framework.ServiceRegistrationImpl.getReference(), org.osgi.framework.ServiceReference.isAssignableTo(), org.knopflerfish.framework.PermissionOps.okGetServicePerms(), and org.knopflerfish.framework.ServiceRegistrationImpl.properties.
synchronized void org.knopflerfish.framework.Services.removeServiceRegistration | ( | ServiceRegistrationImpl | sr | ) | [package] |
Remove a registered service.
sr | The ServiceRegistration object that is registered. |
Definition at line 286 of file Services.java.
References org.knopflerfish.framework.PropertiesDictionary.get(), and org.knopflerfish.framework.ServiceRegistrationImpl.properties.
synchronized Set org.knopflerfish.framework.Services.getRegisteredByBundle | ( | Bundle | b | ) | [package] |
Get all services that a bundle has registered.
b | The bundle |
Definition at line 306 of file Services.java.
References org.knopflerfish.framework.ServiceRegistrationImpl.bundle.
Referenced by org.knopflerfish.framework.BundleImpl.getRegisteredServices().
synchronized Set org.knopflerfish.framework.Services.getUsedByBundle | ( | Bundle | b | ) | [package] |
Get all services that a bundle uses.
b | The bundle |
Definition at line 324 of file Services.java.
References org.knopflerfish.framework.ServiceRegistrationImpl.isUsedByBundle().
Referenced by org.knopflerfish.framework.BundleImpl.getServicesInUse().