org.apache.felix.jmood.core
Class ManagedBundle
java.lang.Object
org.apache.felix.jmood.core.ManagedBundle
- All Implemented Interfaces:
- ManagedBundleMBean
public class ManagedBundle
- extends java.lang.Object
- implements ManagedBundleMBean
This class implements the MBean interface. In order to obtain
the string representation of bundles, services and packages
it uses the CoreUtils static methods.
- See Also:
InstrumentationSupport
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ManagedBundle
public ManagedBundle(org.osgi.framework.Bundle bundle,
AgentContext ac)
getBundleId
public long getBundleId()
- Specified by:
getBundleId
in interface ManagedBundleMBean
getExportedPackages
public java.lang.String[] getExportedPackages()
throws ServiceNotAvailableException
- Specified by:
getExportedPackages
in interface ManagedBundleMBean
- Throws:
ServiceNotAvailableException
getFragments
public java.lang.String[] getFragments()
throws ServiceNotAvailableException
- Specified by:
getFragments
in interface ManagedBundleMBean
- Throws:
ServiceNotAvailableException
getHeaders
public java.util.Hashtable getHeaders()
- Specified by:
getHeaders
in interface ManagedBundleMBean
getHosts
public java.lang.String[] getHosts()
throws ServiceNotAvailableException
- Specified by:
getHosts
in interface ManagedBundleMBean
- Throws:
ServiceNotAvailableException
getImportedPackages
public java.lang.String[] getImportedPackages()
throws ServiceNotAvailableException
- Specified by:
getImportedPackages
in interface ManagedBundleMBean
- Throws:
ServiceNotAvailableException
getLastModified
public long getLastModified()
- Specified by:
getLastModified
in interface ManagedBundleMBean
getRegisteredServices
public java.lang.String[] getRegisteredServices()
- Specified by:
getRegisteredServices
in interface ManagedBundleMBean
getBundleDependencies
public java.lang.String[] getBundleDependencies()
throws ServiceNotAvailableException
- Specified by:
getBundleDependencies
in interface ManagedBundleMBean
- Throws:
ServiceNotAvailableException
getRequiringBundles
public java.lang.String[] getRequiringBundles()
throws ServiceNotAvailableException
- Specified by:
getRequiringBundles
in interface ManagedBundleMBean
- Throws:
ServiceNotAvailableException
getServicesInUse
public java.lang.String[] getServicesInUse()
- Specified by:
getServicesInUse
in interface ManagedBundleMBean
getStartLevel
public int getStartLevel()
throws ServiceNotAvailableException
- Specified by:
getStartLevel
in interface ManagedBundleMBean
- Throws:
ServiceNotAvailableException
setStartLevel
public void setStartLevel(int level)
throws ServiceNotAvailableException
- Throws:
ServiceNotAvailableException
getState
public java.lang.String getState()
- Specified by:
getState
in interface ManagedBundleMBean
getSymbolicName
public java.lang.String getSymbolicName()
- Specified by:
getSymbolicName
in interface ManagedBundleMBean
isBundlePersistentlyStarted
public boolean isBundlePersistentlyStarted()
throws ServiceNotAvailableException
- Specified by:
isBundlePersistentlyStarted
in interface ManagedBundleMBean
- Throws:
ServiceNotAvailableException
isFragment
public boolean isFragment()
throws ServiceNotAvailableException
- Specified by:
isFragment
in interface ManagedBundleMBean
- Throws:
ServiceNotAvailableException
isRemovalPending
public boolean isRemovalPending()
throws ServiceNotAvailableException
- Specified by:
isRemovalPending
in interface ManagedBundleMBean
- Throws:
ServiceNotAvailableException
isRequired
public boolean isRequired()
throws ServiceNotAvailableException
- Specified by:
isRequired
in interface ManagedBundleMBean
- Throws:
ServiceNotAvailableException
start
public void start()
throws org.osgi.framework.BundleException
- Specified by:
start
in interface ManagedBundleMBean
- Throws:
org.osgi.framework.BundleException
stop
public void stop()
throws org.osgi.framework.BundleException
- Specified by:
stop
in interface ManagedBundleMBean
- Throws:
org.osgi.framework.BundleException
update
public void update()
throws org.osgi.framework.BundleException
- Specified by:
update
in interface ManagedBundleMBean
- Throws:
org.osgi.framework.BundleException
updateFromUrl
public void updateFromUrl(java.lang.String url)
throws java.net.MalformedURLException,
org.osgi.framework.BundleException,
java.io.IOException
- Specified by:
updateFromUrl
in interface ManagedBundleMBean
- Throws:
java.net.MalformedURLException
org.osgi.framework.BundleException
java.io.IOException
refreshBundle
public void refreshBundle()
throws BundleNotAvailableException,
ServiceNotAvailableException
- Specified by:
refreshBundle
in interface ManagedBundleMBean
- Throws:
BundleNotAvailableException
ServiceNotAvailableException
resolveBundle
public void resolveBundle()
throws BundleNotAvailableException,
ServiceNotAvailableException
- Specified by:
resolveBundle
in interface ManagedBundleMBean
- Throws:
BundleNotAvailableException
ServiceNotAvailableException
uninstall
public void uninstall()
throws org.osgi.framework.BundleException
- Specified by:
uninstall
in interface ManagedBundleMBean
- Throws:
org.osgi.framework.BundleException