|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.felix.ipojo.composite.CompositeServiceContext
public class CompositeServiceContext
CompositeServiceContext Class. This class provides an implementation of the service context for composite.
| Constructor Summary | |
|---|---|
CompositeServiceContext(BundleContext context)
Constructor. |
|
CompositeServiceContext(BundleContext context,
ComponentInstance instance)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addBundleListener(BundleListener arg0)
Add a bundle listener. |
void |
addedService(ServiceReference reference)
A matching reference has been added. |
void |
addFrameworkListener(FrameworkListener arg0)
Add a framework listener. |
boolean |
addingService(ServiceReference reference)
A new factory is detected. |
void |
addServiceListener(ServiceListener arg0)
Add a service listener. |
void |
addServiceListener(ServiceListener arg0,
String arg1)
Add a filtered service listener. |
Filter |
createFilter(String arg0)
Create a LDAP filter. |
ServiceReference[] |
getAllServiceReferences(String arg0,
String arg1)
Get all service references. |
Bundle |
getBundle()
Get the current bundle. |
Bundle |
getBundle(long bundleId)
Get the bundle object with the given id. |
Bundle[] |
getBundles()
Get installed bundles. |
File |
getDataFile(String filename)
Get a data file. |
String |
getProperty(String key)
Get a property value. |
Object |
getService(ServiceReference arg0)
Get a service object for the given service reference. |
ServiceReference |
getServiceReference(String arg0)
Get a service reference for the required interface. |
ServiceReference[] |
getServiceReferences(String clazz,
String filter)
Get all accessible service reference for the given query. |
Bundle |
installBundle(String location)
Install a bundle. |
Bundle |
installBundle(String location,
InputStream input)
Install a bundle. |
void |
modifiedService(ServiceReference reference,
Object service)
An imported factory is modified. |
ServiceRegistration |
registerService(String[] arg0,
Object arg1,
Dictionary arg2)
Register a service inside the composite context. |
ServiceRegistration |
registerService(String arg0,
Object arg1,
Dictionary arg2)
Register a service inside the composite context. |
void |
removeBundleListener(BundleListener listener)
Remove a bundle listener. |
void |
removedService(ServiceReference reference,
Object service)
An imported factory disappears. |
void |
removeFrameworkListener(FrameworkListener listener)
Remove a framework listener. |
void |
removeServiceListener(ServiceListener arg0)
Remove a service listener. |
void |
start()
Start the registry management. |
void |
stop()
Stop the registry management. |
boolean |
ungetService(ServiceReference arg0)
Unget a service. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CompositeServiceContext(BundleContext context)
context - : the bundle context
public CompositeServiceContext(BundleContext context,
ComponentInstance instance)
context - : the bundle contextinstance - : the component instance owning this context| Method Detail |
|---|
public void addServiceListener(ServiceListener arg0)
addServiceListener in interface ServiceContextaddServiceListener in interface BundleContextarg0 - : The service listener to addServiceContext.addServiceListener(org.osgi.framework.ServiceListener)
public void addServiceListener(ServiceListener arg0,
String arg1)
throws InvalidSyntaxException
addServiceListener in interface ServiceContextaddServiceListener in interface BundleContextarg0 - : the service listener object to addarg1 - : the LDAP filter for this listener
InvalidSyntaxException - : occurs if the LDAP filter is malformedServiceContext.addServiceListener(org.osgi.framework.ServiceListener,
java.lang.String)
public ServiceReference[] getAllServiceReferences(String arg0,
String arg1)
throws InvalidSyntaxException
getAllServiceReferences in interface ServiceContextgetAllServiceReferences in interface BundleContextarg0 - : The required service interface.arg1 - : LDAP filter
InvalidSyntaxException - : occurs when the given filter is malformedServiceContext.getAllServiceReferences(java.lang.String,
java.lang.String)public Object getService(ServiceReference arg0)
getService in interface ServiceContextgetService in interface BundleContextarg0 - : the service reference
ServiceContext.getService(org.osgi.framework.ServiceReference)public ServiceReference getServiceReference(String arg0)
getServiceReference in interface ServiceContextgetServiceReference in interface BundleContextarg0 - : the required interface name
ServiceContext.getServiceReference(java.lang.String)
public ServiceReference[] getServiceReferences(String clazz,
String filter)
throws InvalidSyntaxException
getServiceReferences in interface ServiceContextgetServiceReferences in interface BundleContextclazz - : required interfacefilter - : LDAP filter
InvalidSyntaxException - : occurs when the LDAP filter is malformedServiceContext.getServiceReferences(java.lang.String, java.lang.String)
public ServiceRegistration registerService(String[] arg0,
Object arg1,
Dictionary arg2)
registerService in interface ServiceContextregisterService in interface BundleContextarg0 - : list of interfaces to register.arg1 - : service objectarg2 - : properties list
ServiceContext.registerService(java.lang.String[], java.lang.Object, java.util.Dictionary)
public ServiceRegistration registerService(String arg0,
Object arg1,
Dictionary arg2)
registerService in interface ServiceContextregisterService in interface BundleContextarg0 - : interface to register.arg1 - : service objectarg2 - : properties list
ServiceContext.registerService(java.lang.String, java.lang.Object, java.util.Dictionary)public void removeServiceListener(ServiceListener arg0)
removeServiceListener in interface ServiceContextremoveServiceListener in interface BundleContextarg0 - : the service listener to removeServiceContext.removeServiceListener(org.osgi.framework.ServiceListener)public boolean ungetService(ServiceReference arg0)
ungetService in interface ServiceContextungetService in interface BundleContextarg0 - the service reference to unget
ServiceContext.ungetService(org.osgi.framework.ServiceReference)public void start()
public void stop()
public void addBundleListener(BundleListener arg0)
addBundleListener in interface BundleContextarg0 - : bundle listener to addBundleContext.addBundleListener(org.osgi.framework.BundleListener)public void addFrameworkListener(FrameworkListener arg0)
addFrameworkListener in interface BundleContextarg0 - : framework listener to add.BundleContext.addFrameworkListener(org.osgi.framework.FrameworkListener)
public Filter createFilter(String arg0)
throws InvalidSyntaxException
createFilter in interface BundleContextarg0 - : String-form of the filter
InvalidSyntaxException - : if the given argument is not a valid against the LDAP grammar.BundleContext.createFilter(java.lang.String)public Bundle getBundle()
getBundle in interface BundleContextBundleContext.getBundle()public Bundle getBundle(long bundleId)
getBundle in interface BundleContextbundleId - : bundle id
BundleContext.getBundle(long)public Bundle[] getBundles()
getBundles in interface BundleContextBundleContext.getBundles()public File getDataFile(String filename)
getDataFile in interface BundleContextfilename - : File name.
BundleContext.getDataFile(java.lang.String)public String getProperty(String key)
getProperty in interface BundleContextkey - : key of the asked property
BundleContext.getProperty(java.lang.String)
public Bundle installBundle(String location)
throws BundleException
installBundle in interface BundleContextlocation - : URL of the bundle to install
BundleException - : if the bundle cannot be installed correctlyBundleContext.installBundle(java.lang.String)
public Bundle installBundle(String location,
InputStream input)
throws BundleException
installBundle in interface BundleContextlocation - : URL of the bundle to installinput - :
BundleException - : if the bundle cannot be installed correctlyBundleContext.installBundle(java.lang.String, java.io.InputStream)public void removeBundleListener(BundleListener listener)
removeBundleListener in interface BundleContextlistener - : the listener to removeBundleContext.removeBundleListener(org.osgi.framework.BundleListener)public void removeFrameworkListener(FrameworkListener listener)
removeFrameworkListener in interface BundleContextlistener - : the listener to removeBundleContext.removeFrameworkListener(org.osgi.framework.FrameworkListener)public boolean addingService(ServiceReference reference)
addingService in interface TrackerCustomizerreference - : service reference
TrackerCustomizer.addingService(org.osgi.framework.ServiceReference)public void addedService(ServiceReference reference)
addedService in interface TrackerCustomizerreference - : the added reference.TrackerCustomizer.addedService(org.osgi.framework.ServiceReference)
public void modifiedService(ServiceReference reference,
Object service)
modifiedService in interface TrackerCustomizerreference - : modified referenceservice - : factory object.TrackerCustomizer.modifiedService(org.osgi.framework.ServiceReference, java.lang.Object)
public void removedService(ServiceReference reference,
Object service)
removedService in interface TrackerCustomizerreference - : referenceservice - : factory object.TrackerCustomizer.removedService(org.osgi.framework.ServiceReference, java.lang.Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||