|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.management.NotificationBroadcasterSupport
org.apache.aries.jmx.framework.BundleState
public class BundleState
Implementation of BundleStateMBean
which emits JMX Notification
on Bundle
state changes
Field Summary | |
---|---|
static String |
BUNDLE_EVENT
|
protected org.osgi.framework.BundleContext |
bundleContext
|
protected org.osgi.framework.BundleListener |
bundleListener
|
protected ExecutorService |
eventDispatcher
|
protected Logger |
logger
|
protected org.osgi.service.packageadmin.PackageAdmin |
packageAdmin
|
protected org.osgi.service.startlevel.StartLevel |
startLevel
|
Constructor Summary | |
---|---|
BundleState(org.osgi.framework.BundleContext bundleContext,
org.osgi.service.packageadmin.PackageAdmin packageAdmin,
org.osgi.service.startlevel.StartLevel startLevel,
Logger logger)
|
Method Summary | |
---|---|
protected ExecutorService |
getEventDispatcher()
|
String[] |
getExportedPackages(long bundleId)
Answer the list of exported packages for this bundle. |
long[] |
getFragments(long bundleId)
Answer the list of the bundle ids of the fragments associated with this bundle |
TabularData |
getHeaders(long bundleId)
Answer the headers for the bundle uniquely identified by the bundle id. |
long[] |
getHosts(long fragmentId)
Answer the list of bundle ids of the bundles which host a fragment |
String[] |
getImportedPackages(long bundleId)
Answer the array of the packages imported by this bundle |
long |
getLastModified(long bundleId)
Answer the last modified time of a bundle |
String |
getLocation(long bundleId)
Answer the location of the bundle. |
MBeanNotificationInfo[] |
getNotificationInfo()
|
long[] |
getRegisteredServices(long bundleId)
Answer the list of service identifiers representing the services this bundle exports |
long[] |
getRequiredBundles(long bundleIdentifier)
Answer the list of identifiers of the bundles this bundle depends upon |
long[] |
getRequiringBundles(long bundleIdentifier)
Answer the list of identifiers of the bundles which require this bundle |
long[] |
getServicesInUse(long bundleIdentifier)
Answer the list of service identifiers which refer to the the services this bundle is using |
int |
getStartLevel(long bundleId)
Answer the start level of the bundle |
String |
getState(long bundleId)
Answer the symbolic name of the state of the bundle |
String |
getSymbolicName(long bundleId)
Answer the symbolic name of the bundle |
String |
getVersion(long bundleId)
Answer the location of the bundle. |
boolean |
isFragment(long bundleId)
Answer whether the bundle is a fragment or not |
boolean |
isPersistentlyStarted(long bundleId)
Answer if the bundle is persistently started when its start level is reached |
boolean |
isRemovalPending(long bundleId)
Answer true if the bundle is pending removal |
boolean |
isRequired(long bundleId)
Answer true if the bundle is required by another bundle |
TabularData |
listBundles()
Answer the bundle state of the system in tabular form. |
void |
postDeregister()
|
void |
postRegister(Boolean registrationDone)
|
void |
preDeregister()
|
ObjectName |
preRegister(MBeanServer server,
ObjectName name)
|
protected void |
shutDownDispatcher()
|
Methods inherited from class javax.management.NotificationBroadcasterSupport |
---|
addNotificationListener, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Logger logger
protected org.osgi.framework.BundleContext bundleContext
protected org.osgi.service.packageadmin.PackageAdmin packageAdmin
protected org.osgi.service.startlevel.StartLevel startLevel
protected ExecutorService eventDispatcher
protected org.osgi.framework.BundleListener bundleListener
public static String BUNDLE_EVENT
Constructor Detail |
---|
public BundleState(org.osgi.framework.BundleContext bundleContext, org.osgi.service.packageadmin.PackageAdmin packageAdmin, org.osgi.service.startlevel.StartLevel startLevel, Logger logger)
Method Detail |
---|
public String[] getExportedPackages(long bundleId) throws IOException, IllegalArgumentException
BundleStateMBean
getExportedPackages
in interface BundleStateMBean
IOException
- if the operation fails
IllegalArgumentException
- if the bundle indicated does not existBundleStateMBean.getExportedPackages(long)
public long[] getFragments(long bundleId) throws IOException, IllegalArgumentException
BundleStateMBean
getFragments
in interface BundleStateMBean
IOException
- if the operation fails
IllegalArgumentException
- if the bundle indicated does not existBundleStateMBean.getFragments(long)
public TabularData getHeaders(long bundleId) throws IOException, IllegalArgumentException
BundleStateMBean
BundleStateMBean.HEADERS_TYPE
.
getHeaders
in interface BundleStateMBean
bundleId
- the unique identifier of the bundle
IOException
- if the operation fails
IllegalArgumentException
- if the bundle indicated does not existBundleStateMBean.getHeaders(long)
public long[] getHosts(long fragmentId) throws IOException, IllegalArgumentException
BundleStateMBean
getHosts
in interface BundleStateMBean
fragmentId
- the bundle id of the fragment
IOException
- if the operation fails
IllegalArgumentException
- if the bundle indicated does not existBundleStateMBean.getHosts(long)
public String[] getImportedPackages(long bundleId) throws IOException, IllegalArgumentException
BundleStateMBean
getImportedPackages
in interface BundleStateMBean
bundleId
- the bundle identifier
IOException
- if the operation fails
IllegalArgumentException
- if the bundle indicated does not existBundleStateMBean.getImportedPackages(long)
public long getLastModified(long bundleId) throws IOException, IllegalArgumentException
BundleStateMBean
getLastModified
in interface BundleStateMBean
bundleId
- the unique identifier of a bundle
IOException
- if the operation fails
IllegalArgumentException
- if the bundle indicated does not existBundleStateMBean.getLastModified(long)
public String getLocation(long bundleId) throws IOException, IllegalArgumentException
BundleStateMBean
getLocation
in interface BundleStateMBean
bundleId
- the identifier of the bundle
IOException
- if the operation fails
IllegalArgumentException
- if the bundle indicated does not existBundleStateMBean.getLocation(long)
public long[] getRegisteredServices(long bundleId) throws IOException, IllegalArgumentException
BundleStateMBean
getRegisteredServices
in interface BundleStateMBean
bundleId
- the bundle identifier
IOException
- if the operation fails
IllegalArgumentException
- if the bundle indicated does not existBundleStateMBean.getRegisteredServices(long)
public long[] getRequiredBundles(long bundleIdentifier) throws IOException, IllegalArgumentException
BundleStateMBean
getRequiredBundles
in interface BundleStateMBean
bundleIdentifier
- the bundle identifier
IOException
- if the operation fails
IllegalArgumentException
- if the bundle indicated does not existBundleStateMBean.getRequiredBundles(long)
public long[] getRequiringBundles(long bundleIdentifier) throws IOException, IllegalArgumentException
BundleStateMBean
getRequiringBundles
in interface BundleStateMBean
bundleIdentifier
- the bundle identifier
IOException
- if the operation fails
IllegalArgumentException
- if the bundle indicated does not existBundleStateMBean.getRequiringBundles(long)
public long[] getServicesInUse(long bundleIdentifier) throws IOException, IllegalArgumentException
BundleStateMBean
getServicesInUse
in interface BundleStateMBean
bundleIdentifier
- the bundle identifier
IOException
- if the operation fails
IllegalArgumentException
- if the bundle indicated does not existBundleStateMBean.getServicesInUse(long)
public int getStartLevel(long bundleId) throws IOException, IllegalArgumentException
BundleStateMBean
getStartLevel
in interface BundleStateMBean
bundleId
- the identifier of the bundle
IOException
- if the operation fails
IllegalArgumentException
- if the bundle indicated does not existBundleStateMBean.getStartLevel(long)
public String getState(long bundleId) throws IOException, IllegalArgumentException
BundleStateMBean
getState
in interface BundleStateMBean
bundleId
- the identifier of the bundle
IOException
- if the operation fails
IllegalArgumentException
- if the bundle indicated does not existBundleStateMBean.getState(long)
public String getSymbolicName(long bundleId) throws IOException, IllegalArgumentException
BundleStateMBean
getSymbolicName
in interface BundleStateMBean
bundleId
- the identifier of the bundle
IOException
- if the operation fails
IllegalArgumentException
- if the bundle indicated does not existBundleStateMBean.getSymbolicName(long)
public String getVersion(long bundleId) throws IOException, IllegalArgumentException
BundleStateMBean
getVersion
in interface BundleStateMBean
bundleId
- the identifier of the bundle
IOException
- if the operation fails
IllegalArgumentException
- if the bundle indicated does not existBundleStateMBean.getVersion(long)
public boolean isFragment(long bundleId) throws IOException, IllegalArgumentException
BundleStateMBean
isFragment
in interface BundleStateMBean
bundleId
- the identifier of the bundle
IOException
- if the operation fails
IllegalArgumentException
- if the bundle indicated does not existBundleStateMBean.isFragment(long)
public boolean isPersistentlyStarted(long bundleId) throws IOException, IllegalArgumentException
BundleStateMBean
isPersistentlyStarted
in interface BundleStateMBean
bundleId
- the identifier of the bundle
IOException
- if the operation fails
IllegalArgumentException
- if the bundle indicated does not existBundleStateMBean.isPersistentlyStarted(long)
public boolean isRemovalPending(long bundleId) throws IOException, IllegalArgumentException
BundleStateMBean
isRemovalPending
in interface BundleStateMBean
bundleId
- the identifier of the bundle
IOException
- if the operation fails
IllegalArgumentException
- if the bundle indicated does not existBundleStateMBean.isRemovalPending(long)
public boolean isRequired(long bundleId) throws IOException, IllegalArgumentException
BundleStateMBean
isRequired
in interface BundleStateMBean
bundleId
- the identifier of the bundle
IOException
- if the operation fails
IllegalArgumentException
- if the bundle indicated does not existBundleStateMBean.isRequired(long)
public TabularData listBundles() throws IOException
BundleStateMBean
BundleStateMBean.BUNDLES_TYPE
.
listBundles
in interface BundleStateMBean
IOException
BundleStateMBean.listBundles()
public MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo
in interface NotificationBroadcaster
getNotificationInfo
in class NotificationBroadcasterSupport
NotificationBroadcasterSupport.getNotificationInfo()
public void postDeregister()
postDeregister
in interface MBeanRegistration
MBeanRegistration.postDeregister()
public void postRegister(Boolean registrationDone)
postRegister
in interface MBeanRegistration
MBeanRegistration.postRegister(java.lang.Boolean)
public void preDeregister() throws Exception
preDeregister
in interface MBeanRegistration
Exception
MBeanRegistration.preDeregister()
public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
preRegister
in interface MBeanRegistration
Exception
MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName)
protected void shutDownDispatcher()
protected ExecutorService getEventDispatcher()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |