Package org.jitsi.impl.osgi.framework
Class BundleImpl
- java.lang.Object
-
- org.jitsi.impl.osgi.framework.BundleImpl
-
- All Implemented Interfaces:
Comparable<org.osgi.framework.Bundle>,BundleActivatorHolder,org.osgi.framework.Bundle
- Direct Known Subclasses:
FrameworkImpl
public class BundleImpl extends Object implements org.osgi.framework.Bundle, BundleActivatorHolder
- Author:
- Lyubomir Marinov, Pawel Domas
-
-
Field Summary
Fields Modifier and Type Field Description protected ClassLoaderclassLoader
-
Constructor Summary
Constructors Constructor Description BundleImpl(FrameworkImpl framework, long bundleId, String location, ClassLoader classLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <A> Aadapt(Class<A> type)voidaddBundleActivator(Class<? extends org.osgi.framework.BundleActivator> activatorClass)Registers aBundleActivatorwith this instance.intcompareTo(org.osgi.framework.Bundle other)Enumeration<URL>findEntries(String path, String filePattern, boolean recurse)org.osgi.framework.BundleContextgetBundleContext()longgetBundleId()FilegetDataFile(String filename)URLgetEntry(String path)Enumeration<String>getEntryPaths(String path)FrameworkImplgetFramework()Dictionary<String,String>getHeaders()Dictionary<String,String>getHeaders(String locale)longgetLastModified()StringgetLocation()org.osgi.framework.ServiceReference<?>[]getRegisteredServices()URLgetResource(String name)Enumeration<URL>getResources(String name)org.osgi.framework.ServiceReference<?>[]getServicesInUse()Map<X509Certificate,List<X509Certificate>>getSignerCertificates(int signersType)intgetState()StringgetSymbolicName()org.osgi.framework.VersiongetVersion()booleanhasPermission(Object permission)Class<?>loadClass(String name)protected voidsetBundleContext(org.osgi.framework.BundleContext bundleContext)protected voidsetState(int state)voidstart()voidstart(int options)protected voidstateChanged(int oldState, int newState)voidstop()voidstop(int options)voiduninstall()voidupdate()voidupdate(InputStream input)
-
-
-
Field Detail
-
classLoader
protected final ClassLoader classLoader
-
-
Constructor Detail
-
BundleImpl
public BundleImpl(FrameworkImpl framework, long bundleId, String location, ClassLoader classLoader)
-
-
Method Detail
-
adapt
public <A> A adapt(Class<A> type)
- Specified by:
adaptin interfaceorg.osgi.framework.Bundle
-
compareTo
public int compareTo(org.osgi.framework.Bundle other)
- Specified by:
compareToin interfaceComparable<org.osgi.framework.Bundle>
-
findEntries
public Enumeration<URL> findEntries(String path, String filePattern, boolean recurse)
- Specified by:
findEntriesin interfaceorg.osgi.framework.Bundle
-
getBundleContext
public org.osgi.framework.BundleContext getBundleContext()
- Specified by:
getBundleContextin interfaceorg.osgi.framework.Bundle
-
getBundleId
public long getBundleId()
- Specified by:
getBundleIdin interfaceorg.osgi.framework.Bundle
-
getDataFile
public File getDataFile(String filename)
- Specified by:
getDataFilein interfaceorg.osgi.framework.Bundle
-
getEntry
public URL getEntry(String path)
- Specified by:
getEntryin interfaceorg.osgi.framework.Bundle
-
getEntryPaths
public Enumeration<String> getEntryPaths(String path)
- Specified by:
getEntryPathsin interfaceorg.osgi.framework.Bundle
-
getFramework
public FrameworkImpl getFramework()
-
getHeaders
public Dictionary<String,String> getHeaders()
- Specified by:
getHeadersin interfaceorg.osgi.framework.Bundle
-
getHeaders
public Dictionary<String,String> getHeaders(String locale)
- Specified by:
getHeadersin interfaceorg.osgi.framework.Bundle
-
getLastModified
public long getLastModified()
- Specified by:
getLastModifiedin interfaceorg.osgi.framework.Bundle
-
getLocation
public String getLocation()
- Specified by:
getLocationin interfaceorg.osgi.framework.Bundle
-
getRegisteredServices
public org.osgi.framework.ServiceReference<?>[] getRegisteredServices()
- Specified by:
getRegisteredServicesin interfaceorg.osgi.framework.Bundle
-
getResource
public URL getResource(String name)
- Specified by:
getResourcein interfaceorg.osgi.framework.Bundle
-
getResources
public Enumeration<URL> getResources(String name)
- Specified by:
getResourcesin interfaceorg.osgi.framework.Bundle
-
getServicesInUse
public org.osgi.framework.ServiceReference<?>[] getServicesInUse()
- Specified by:
getServicesInUsein interfaceorg.osgi.framework.Bundle
-
getSignerCertificates
public Map<X509Certificate,List<X509Certificate>> getSignerCertificates(int signersType)
- Specified by:
getSignerCertificatesin interfaceorg.osgi.framework.Bundle
-
getState
public int getState()
- Specified by:
getStatein interfaceorg.osgi.framework.Bundle
-
getSymbolicName
public String getSymbolicName()
- Specified by:
getSymbolicNamein interfaceorg.osgi.framework.Bundle
-
getVersion
public org.osgi.framework.Version getVersion()
- Specified by:
getVersionin interfaceorg.osgi.framework.Bundle
-
hasPermission
public boolean hasPermission(Object permission)
- Specified by:
hasPermissionin interfaceorg.osgi.framework.Bundle
-
loadClass
public Class<?> loadClass(String name) throws ClassNotFoundException
- Specified by:
loadClassin interfaceorg.osgi.framework.Bundle- Throws:
ClassNotFoundException
-
setBundleContext
protected void setBundleContext(org.osgi.framework.BundleContext bundleContext)
-
setState
protected void setState(int state)
-
start
public void start() throws org.osgi.framework.BundleException- Specified by:
startin interfaceorg.osgi.framework.Bundle- Throws:
org.osgi.framework.BundleException
-
start
public void start(int options) throws org.osgi.framework.BundleException- Specified by:
startin interfaceorg.osgi.framework.Bundle- Throws:
org.osgi.framework.BundleException
-
stateChanged
protected void stateChanged(int oldState, int newState)
-
stop
public void stop() throws org.osgi.framework.BundleException- Specified by:
stopin interfaceorg.osgi.framework.Bundle- Throws:
org.osgi.framework.BundleException
-
stop
public void stop(int options) throws org.osgi.framework.BundleException- Specified by:
stopin interfaceorg.osgi.framework.Bundle- Throws:
org.osgi.framework.BundleException
-
uninstall
public void uninstall()
- Specified by:
uninstallin interfaceorg.osgi.framework.Bundle
-
update
public void update() throws org.osgi.framework.BundleException- Specified by:
updatein interfaceorg.osgi.framework.Bundle- Throws:
org.osgi.framework.BundleException
-
update
public void update(InputStream input) throws org.osgi.framework.BundleException
- Specified by:
updatein interfaceorg.osgi.framework.Bundle- Throws:
org.osgi.framework.BundleException
-
addBundleActivator
public void addBundleActivator(Class<? extends org.osgi.framework.BundleActivator> activatorClass)
Description copied from interface:BundleActivatorHolderRegisters aBundleActivatorwith this instance.- Specified by:
addBundleActivatorin interfaceBundleActivatorHolder- Parameters:
activatorClass- the Activator to register with this bundle.
-
-