org.jboss.osgi.spi.framework
Class BundleContextWrapper
java.lang.Object
org.jboss.osgi.spi.framework.BundleContextWrapper
- All Implemented Interfaces:
- org.osgi.framework.BundleContext
public class BundleContextWrapper
- extends java.lang.Object
- implements org.osgi.framework.BundleContext
A generic BundleContext wrapper that delegates all method calls to the underlying
BundleContext implementation.
- Since:
- 16-Oct-2009
- Author:
- thomas.diesler@jboss.com
|
Field Summary |
protected org.osgi.framework.BundleContext |
context
|
|
Method Summary |
void |
addBundleListener(org.osgi.framework.BundleListener listener)
|
void |
addFrameworkListener(org.osgi.framework.FrameworkListener listener)
|
void |
addServiceListener(org.osgi.framework.ServiceListener listener)
|
void |
addServiceListener(org.osgi.framework.ServiceListener listener,
java.lang.String filter)
|
org.osgi.framework.Filter |
createFilter(java.lang.String filter)
|
org.osgi.framework.ServiceReference[] |
getAllServiceReferences(java.lang.String clazz,
java.lang.String filter)
|
org.osgi.framework.Bundle |
getBundle()
|
org.osgi.framework.Bundle |
getBundle(long id)
|
org.osgi.framework.Bundle[] |
getBundles()
|
java.io.File |
getDataFile(java.lang.String filename)
|
java.lang.String |
getProperty(java.lang.String key)
|
java.lang.Object |
getService(org.osgi.framework.ServiceReference reference)
|
org.osgi.framework.ServiceReference |
getServiceReference(java.lang.String clazz)
|
org.osgi.framework.ServiceReference[] |
getServiceReferences(java.lang.String clazz,
java.lang.String filter)
|
org.osgi.framework.Bundle |
installBundle(java.lang.String location)
|
org.osgi.framework.Bundle |
installBundle(java.lang.String location,
java.io.InputStream input)
|
org.osgi.framework.ServiceRegistration |
registerService(java.lang.String[] clazzes,
java.lang.Object service,
java.util.Dictionary properties)
|
org.osgi.framework.ServiceRegistration |
registerService(java.lang.String clazz,
java.lang.Object service,
java.util.Dictionary properties)
|
void |
removeBundleListener(org.osgi.framework.BundleListener listener)
|
void |
removeFrameworkListener(org.osgi.framework.FrameworkListener listener)
|
void |
removeServiceListener(org.osgi.framework.ServiceListener listener)
|
boolean |
ungetService(org.osgi.framework.ServiceReference reference)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
context
protected org.osgi.framework.BundleContext context
BundleContextWrapper
public BundleContextWrapper(org.osgi.framework.BundleContext context)
addBundleListener
public void addBundleListener(org.osgi.framework.BundleListener listener)
- Specified by:
addBundleListener in interface org.osgi.framework.BundleContext
addFrameworkListener
public void addFrameworkListener(org.osgi.framework.FrameworkListener listener)
- Specified by:
addFrameworkListener in interface org.osgi.framework.BundleContext
addServiceListener
public void addServiceListener(org.osgi.framework.ServiceListener listener,
java.lang.String filter)
throws org.osgi.framework.InvalidSyntaxException
- Specified by:
addServiceListener in interface org.osgi.framework.BundleContext
- Throws:
org.osgi.framework.InvalidSyntaxException
addServiceListener
public void addServiceListener(org.osgi.framework.ServiceListener listener)
- Specified by:
addServiceListener in interface org.osgi.framework.BundleContext
createFilter
public org.osgi.framework.Filter createFilter(java.lang.String filter)
throws org.osgi.framework.InvalidSyntaxException
- Specified by:
createFilter in interface org.osgi.framework.BundleContext
- Throws:
org.osgi.framework.InvalidSyntaxException
getAllServiceReferences
public org.osgi.framework.ServiceReference[] getAllServiceReferences(java.lang.String clazz,
java.lang.String filter)
throws org.osgi.framework.InvalidSyntaxException
- Specified by:
getAllServiceReferences in interface org.osgi.framework.BundleContext
- Throws:
org.osgi.framework.InvalidSyntaxException
getBundle
public org.osgi.framework.Bundle getBundle()
- Specified by:
getBundle in interface org.osgi.framework.BundleContext
getBundle
public org.osgi.framework.Bundle getBundle(long id)
- Specified by:
getBundle in interface org.osgi.framework.BundleContext
getBundles
public org.osgi.framework.Bundle[] getBundles()
- Specified by:
getBundles in interface org.osgi.framework.BundleContext
getDataFile
public java.io.File getDataFile(java.lang.String filename)
- Specified by:
getDataFile in interface org.osgi.framework.BundleContext
getProperty
public java.lang.String getProperty(java.lang.String key)
- Specified by:
getProperty in interface org.osgi.framework.BundleContext
getService
public java.lang.Object getService(org.osgi.framework.ServiceReference reference)
- Specified by:
getService in interface org.osgi.framework.BundleContext
getServiceReference
public org.osgi.framework.ServiceReference getServiceReference(java.lang.String clazz)
- Specified by:
getServiceReference in interface org.osgi.framework.BundleContext
getServiceReferences
public org.osgi.framework.ServiceReference[] getServiceReferences(java.lang.String clazz,
java.lang.String filter)
throws org.osgi.framework.InvalidSyntaxException
- Specified by:
getServiceReferences in interface org.osgi.framework.BundleContext
- Throws:
org.osgi.framework.InvalidSyntaxException
installBundle
public org.osgi.framework.Bundle installBundle(java.lang.String location,
java.io.InputStream input)
throws org.osgi.framework.BundleException
- Specified by:
installBundle in interface org.osgi.framework.BundleContext
- Throws:
org.osgi.framework.BundleException
installBundle
public org.osgi.framework.Bundle installBundle(java.lang.String location)
throws org.osgi.framework.BundleException
- Specified by:
installBundle in interface org.osgi.framework.BundleContext
- Throws:
org.osgi.framework.BundleException
registerService
public org.osgi.framework.ServiceRegistration registerService(java.lang.String clazz,
java.lang.Object service,
java.util.Dictionary properties)
- Specified by:
registerService in interface org.osgi.framework.BundleContext
registerService
public org.osgi.framework.ServiceRegistration registerService(java.lang.String[] clazzes,
java.lang.Object service,
java.util.Dictionary properties)
- Specified by:
registerService in interface org.osgi.framework.BundleContext
removeBundleListener
public void removeBundleListener(org.osgi.framework.BundleListener listener)
- Specified by:
removeBundleListener in interface org.osgi.framework.BundleContext
removeFrameworkListener
public void removeFrameworkListener(org.osgi.framework.FrameworkListener listener)
- Specified by:
removeFrameworkListener in interface org.osgi.framework.BundleContext
removeServiceListener
public void removeServiceListener(org.osgi.framework.ServiceListener listener)
- Specified by:
removeServiceListener in interface org.osgi.framework.BundleContext
ungetService
public boolean ungetService(org.osgi.framework.ServiceReference reference)
- Specified by:
ungetService in interface org.osgi.framework.BundleContext
Copyright © 2010. All Rights Reserved.