Package org.nuxeo.osgi
Class BundleImpl
java.lang.Object
org.nuxeo.osgi.BundleImpl
- All Implemented Interfaces:
org.osgi.framework.Bundle
- Direct Known Subclasses:
RootRuntimeBundle
,SystemBundle
- Author:
- Bogdan Stefanescu
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.osgi.framework.BundleActivator
protected boolean
protected final org.osgi.framework.BundleContext
protected final BundleFile
protected final Dictionary<String,
String> protected final long
protected long
protected final ClassLoader
protected final String
protected final OSGiAdapter
protected double
protected int
protected final String
Fields inherited from interface org.osgi.framework.Bundle
ACTIVE, INSTALLED, RESOLVED, SIGNERS_ALL, SIGNERS_TRUSTED, START_ACTIVATION_POLICY, START_TRANSIENT, STARTING, STOP_TRANSIENT, STOPPING, UNINSTALLED
-
Constructor Summary
ConstructorDescriptionBundleImpl
(OSGiAdapter osgi, BundleFile file, ClassLoader loader) BundleImpl
(OSGiAdapter osgi, BundleFile file, ClassLoader loader, boolean isSystemBundle) -
Method Summary
Modifier and TypeMethodDescriptionprotected final org.osgi.framework.BundleContext
boolean
findEntries
(String path, String filePattern, boolean recurse) org.osgi.framework.BundleActivator
protected String
org.osgi.framework.BundleContext
long
getEntryPaths
(String path) getHeaders
(String locale) long
static org.osgi.service.packageadmin.PackageAdmin
org.osgi.framework.ServiceReference[]
getResource
(String name) getResources
(String name) org.osgi.framework.ServiceReference[]
getSignerCertificates
(int signersType) double
int
getState()
org.osgi.framework.Version
int
hashCode()
boolean
hasPermission
(Object permission) Class<?>
void
shutdown()
void
start()
void
start
(int options) void
stop()
void
stop
(int options) toString()
void
void
update()
void
update
(InputStream in)
-
Field Details
-
id
protected final long id -
symbolicName
-
headers
-
context
protected final org.osgi.framework.BundleContext context -
osgi
-
file
-
location
-
loader
-
state
protected int state -
lastModified
protected long lastModified -
activator
protected org.osgi.framework.BundleActivator activator -
startupTime
protected double startupTime -
allowHostOverride
protected boolean allowHostOverride
-
-
Constructor Details
-
BundleImpl
public BundleImpl(OSGiAdapter osgi, BundleFile file, ClassLoader loader) throws org.osgi.framework.BundleException - Throws:
org.osgi.framework.BundleException
-
BundleImpl
public BundleImpl(OSGiAdapter osgi, BundleFile file, ClassLoader loader, boolean isSystemBundle) throws org.osgi.framework.BundleException - Throws:
org.osgi.framework.BundleException
-
-
Method Details
-
getBundleFile
-
createContext
protected final org.osgi.framework.BundleContext createContext() -
getBundleContext
public org.osgi.framework.BundleContext getBundleContext()- Specified by:
getBundleContext
in interfaceorg.osgi.framework.Bundle
-
start
public void start(int options) throws org.osgi.framework.BundleException - Specified by:
start
in interfaceorg.osgi.framework.Bundle
- Throws:
org.osgi.framework.BundleException
-
stop
public void stop(int options) throws org.osgi.framework.BundleException - Specified by:
stop
in interfaceorg.osgi.framework.Bundle
- Throws:
org.osgi.framework.BundleException
-
getLocation
- Specified by:
getLocation
in interfaceorg.osgi.framework.Bundle
-
getResource
- Specified by:
getResource
in interfaceorg.osgi.framework.Bundle
-
getResources
- Specified by:
getResources
in interfaceorg.osgi.framework.Bundle
- Throws:
IOException
-
loadClass
- Specified by:
loadClass
in interfaceorg.osgi.framework.Bundle
- Throws:
ClassNotFoundException
-
getEntry
- Specified by:
getEntry
in interfaceorg.osgi.framework.Bundle
-
getPackageAdmin
public static org.osgi.service.packageadmin.PackageAdmin getPackageAdmin() -
findEntries
- Specified by:
findEntries
in interfaceorg.osgi.framework.Bundle
-
getEntryPaths
- Specified by:
getEntryPaths
in interfaceorg.osgi.framework.Bundle
-
getBundleId
public long getBundleId()- Specified by:
getBundleId
in interfaceorg.osgi.framework.Bundle
-
getHeaders
- Specified by:
getHeaders
in interfaceorg.osgi.framework.Bundle
-
getHeaders
- Specified by:
getHeaders
in interfaceorg.osgi.framework.Bundle
-
getLastModified
public long getLastModified()- Specified by:
getLastModified
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
-
getState
public int getState()- Specified by:
getState
in interfaceorg.osgi.framework.Bundle
-
getSymbolicName
- Specified by:
getSymbolicName
in interfaceorg.osgi.framework.Bundle
-
hasPermission
- Specified by:
hasPermission
in interfaceorg.osgi.framework.Bundle
-
getActivatorClassName
-
getActivator
public org.osgi.framework.BundleActivator getActivator() throws org.osgi.framework.BundleException- Throws:
org.osgi.framework.BundleException
-
start
public void start() 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
-
shutdown
public void shutdown() throws org.osgi.framework.BundleException- 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
- Specified by:
update
in interfaceorg.osgi.framework.Bundle
- Throws:
org.osgi.framework.BundleException
-
getStartupTime
public double getStartupTime() -
hashCode
public int hashCode() -
equals
-
toString
-
getSignerCertificates
- Specified by:
getSignerCertificates
in interfaceorg.osgi.framework.Bundle
-
getVersion
public org.osgi.framework.Version getVersion()- Specified by:
getVersion
in interfaceorg.osgi.framework.Bundle
-