Class DelegatingBundle
- java.lang.Object
-
- org.apache.xbean.osgi.bundle.util.DelegatingBundle
-
- All Implemented Interfaces:
java.lang.Comparable<org.osgi.framework.Bundle>
,org.osgi.framework.Bundle
public class DelegatingBundle extends java.lang.Object implements org.osgi.framework.Bundle
Bundle that delegates ClassLoader operations to a collection ofBundle
objects.- Version:
- $Rev: 1371482 $ $Date: 2012-08-09 22:58:28 +0200 (Thu, 09 Aug 2012) $
-
-
Constructor Summary
Constructors Constructor Description DelegatingBundle(java.util.Collection<org.osgi.framework.Bundle> bundles)
DelegatingBundle(org.osgi.framework.Bundle bundle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <A> A
adapt(java.lang.Class<A> type)
void
addBundle(org.osgi.framework.Bundle b)
int
compareTo(org.osgi.framework.Bundle other)
java.util.Enumeration
findEntries(java.lang.String arg0, java.lang.String arg1, boolean arg2)
org.osgi.framework.BundleContext
getBundleContext()
long
getBundleId()
java.io.File
getDataFile(java.lang.String filename)
java.net.URL
getEntry(java.lang.String arg0)
java.util.Enumeration
getEntryPaths(java.lang.String arg0)
java.util.Dictionary
getHeaders()
java.util.Dictionary
getHeaders(java.lang.String arg0)
long
getLastModified()
java.lang.String
getLocation()
org.osgi.framework.Bundle
getMainBundle()
org.osgi.framework.ServiceReference[]
getRegisteredServices()
java.net.URL
getResource(java.lang.String name)
java.util.Enumeration<java.net.URL>
getResources(java.lang.String name)
org.osgi.framework.ServiceReference[]
getServicesInUse()
java.util.Map
getSignerCertificates(int arg0)
int
getState()
java.lang.String
getSymbolicName()
org.osgi.framework.Version
getVersion()
boolean
hasPermission(java.lang.Object arg0)
java.lang.Class<?>
loadClass(java.lang.String name)
void
removeBundle(org.osgi.framework.Bundle b)
void
start()
void
start(int arg0)
void
stop()
void
stop(int arg0)
java.lang.String
toString()
void
uninstall()
void
update()
void
update(java.io.InputStream arg0)
-
-
-
Method Detail
-
getMainBundle
public org.osgi.framework.Bundle getMainBundle()
-
loadClass
public java.lang.Class<?> loadClass(java.lang.String name) throws java.lang.ClassNotFoundException
- Specified by:
loadClass
in interfaceorg.osgi.framework.Bundle
- Throws:
java.lang.ClassNotFoundException
-
addBundle
public void addBundle(org.osgi.framework.Bundle b)
-
removeBundle
public void removeBundle(org.osgi.framework.Bundle b)
-
getResource
public java.net.URL getResource(java.lang.String name)
- Specified by:
getResource
in interfaceorg.osgi.framework.Bundle
-
getResources
public java.util.Enumeration<java.net.URL> getResources(java.lang.String name) throws java.io.IOException
- Specified by:
getResources
in interfaceorg.osgi.framework.Bundle
- Throws:
java.io.IOException
-
getBundleContext
public org.osgi.framework.BundleContext getBundleContext()
- Specified by:
getBundleContext
in interfaceorg.osgi.framework.Bundle
-
findEntries
public java.util.Enumeration findEntries(java.lang.String arg0, java.lang.String arg1, boolean arg2)
- Specified by:
findEntries
in interfaceorg.osgi.framework.Bundle
-
getBundleId
public long getBundleId()
- Specified by:
getBundleId
in interfaceorg.osgi.framework.Bundle
-
getEntry
public java.net.URL getEntry(java.lang.String arg0)
- Specified by:
getEntry
in interfaceorg.osgi.framework.Bundle
-
getEntryPaths
public java.util.Enumeration getEntryPaths(java.lang.String arg0)
- Specified by:
getEntryPaths
in interfaceorg.osgi.framework.Bundle
-
getHeaders
public java.util.Dictionary getHeaders()
- Specified by:
getHeaders
in interfaceorg.osgi.framework.Bundle
-
getHeaders
public java.util.Dictionary getHeaders(java.lang.String arg0)
- Specified by:
getHeaders
in interfaceorg.osgi.framework.Bundle
-
getLastModified
public long getLastModified()
- Specified by:
getLastModified
in interfaceorg.osgi.framework.Bundle
-
getLocation
public java.lang.String getLocation()
- Specified by:
getLocation
in interfaceorg.osgi.framework.Bundle
-
getRegisteredServices
public org.osgi.framework.ServiceReference[] getRegisteredServices()
- Specified by:
getRegisteredServices
in interfaceorg.osgi.framework.Bundle
-
getServicesInUse
public org.osgi.framework.ServiceReference[] getServicesInUse()
- Specified by:
getServicesInUse
in interfaceorg.osgi.framework.Bundle
-
getSignerCertificates
public java.util.Map getSignerCertificates(int arg0)
- Specified by:
getSignerCertificates
in interfaceorg.osgi.framework.Bundle
-
getState
public int getState()
- Specified by:
getState
in interfaceorg.osgi.framework.Bundle
-
getSymbolicName
public java.lang.String getSymbolicName()
- Specified by:
getSymbolicName
in interfaceorg.osgi.framework.Bundle
-
getVersion
public org.osgi.framework.Version getVersion()
- Specified by:
getVersion
in interfaceorg.osgi.framework.Bundle
-
hasPermission
public boolean hasPermission(java.lang.Object arg0)
- Specified by:
hasPermission
in interfaceorg.osgi.framework.Bundle
-
start
public void start() throws org.osgi.framework.BundleException
- Specified by:
start
in interfaceorg.osgi.framework.Bundle
- Throws:
org.osgi.framework.BundleException
-
start
public void start(int arg0) throws org.osgi.framework.BundleException
- Specified by:
start
in interfaceorg.osgi.framework.Bundle
- Throws:
org.osgi.framework.BundleException
-
stop
public void stop() throws org.osgi.framework.BundleException
- Specified by:
stop
in interfaceorg.osgi.framework.Bundle
- Throws:
org.osgi.framework.BundleException
-
stop
public void stop(int arg0) throws org.osgi.framework.BundleException
- Specified by:
stop
in interfaceorg.osgi.framework.Bundle
- Throws:
org.osgi.framework.BundleException
-
uninstall
public void uninstall() throws org.osgi.framework.BundleException
- Specified by:
uninstall
in interfaceorg.osgi.framework.Bundle
- Throws:
org.osgi.framework.BundleException
-
update
public void update() throws org.osgi.framework.BundleException
- Specified by:
update
in interfaceorg.osgi.framework.Bundle
- Throws:
org.osgi.framework.BundleException
-
update
public void update(java.io.InputStream arg0) throws org.osgi.framework.BundleException
- Specified by:
update
in interfaceorg.osgi.framework.Bundle
- Throws:
org.osgi.framework.BundleException
-
compareTo
public int compareTo(org.osgi.framework.Bundle other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<org.osgi.framework.Bundle>
-
adapt
public <A> A adapt(java.lang.Class<A> type)
- Specified by:
adapt
in interfaceorg.osgi.framework.Bundle
-
getDataFile
public java.io.File getDataFile(java.lang.String filename)
- Specified by:
getDataFile
in interfaceorg.osgi.framework.Bundle
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-