com.oracle.osgi.jmx.core
Class BundleState

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by com.oracle.osgi.jmx.Monitor
          extended by com.oracle.osgi.jmx.core.BundleState
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.osgi.jmx.core.BundleStateMBean

public class BundleState
extends Monitor
implements org.osgi.jmx.core.BundleStateMBean

Author:
Hal Hildebrand Date: Nov 23, 2008 Time: 5:35:53 PM

Field Summary
protected  org.osgi.service.packageadmin.PackageAdmin admin
           
protected  org.osgi.framework.BundleContext bc
           
protected  org.osgi.framework.BundleListener bundleListener
           
protected  org.osgi.service.startlevel.StartLevel sl
           
 
Fields inherited from class com.oracle.osgi.jmx.Monitor
objectName, sequenceNumber, server
 
Fields inherited from interface org.osgi.jmx.core.BundleStateMBean
BUNDLE, BUNDLE_EVENT, BUNDLE_EVENT_TYPE, BUNDLE_EXPORTED_PACKAGES, BUNDLE_FRAGMENT, BUNDLE_FRAGMENTS, BUNDLE_HEADER_TYPE, BUNDLE_HEADERS, BUNDLE_HEADERS_TYPE, BUNDLE_HOSTS, BUNDLE_ID, BUNDLE_IMPORTED_PACKAGES, BUNDLE_LAST_MODIFIED, BUNDLE_LOCATION, BUNDLE_PERSISTENTLY_STARTED, BUNDLE_REGISTERED_SERVICES, BUNDLE_REMOVAL_PENDING, BUNDLE_REQUIRED, BUNDLE_REQUIRED_BUNDLES, BUNDLE_REQUIRING_BUNDLES, BUNDLE_SERVICES_IN_USE, BUNDLE_START_LEVEL, BUNDLE_STATE, BUNDLE_SYMBOLIC_NAME, BUNDLE_TYPE_NAME, EVENT_TYPE
 
Constructor Summary
BundleState(org.osgi.framework.BundleContext bc, org.osgi.service.startlevel.StartLevel sl, org.osgi.service.packageadmin.PackageAdmin admin)
           
 
Method Summary
protected  void addListener()
           
protected  org.osgi.framework.BundleListener getBundleListener()
           
 javax.management.openmbean.TabularData getBundles()
           
 long[] getDependencies(long bundleIdentifier)
           
 java.lang.String[] getExportedPackages(long bundleId)
           
 long[] getFragments(long bundleId)
           
 javax.management.openmbean.TabularData getHeaders(long bundleId)
           
 long[] getHosts(long fragment)
           
 java.lang.String[] getImportedPackages(long bundleId)
           
 long getLastModified(long bundleId)
           
 long[] getRegisteredServices(long bundleId)
           
 long[] getRequiringBundles(long bundleIdentifier)
           
 long[] getServicesInUse(long bundleIdentifier)
           
 int getStartLevel(long bundleId)
           
 java.lang.String getState(long bundleId)
           
 java.lang.String getSymbolicName(long bundleId)
           
 boolean isFragment(long bundleId)
           
 boolean isPersistentlyStarted(long bundleId)
           
 boolean isRemovalPending(long bundleId)
           
 boolean isRequired(long bundleId)
           
protected  void removeListener()
           
 
Methods inherited from class com.oracle.osgi.jmx.Monitor
postDeregister, postRegister, preDeregister, preRegister
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bundleListener

protected org.osgi.framework.BundleListener bundleListener

bc

protected org.osgi.framework.BundleContext bc

sl

protected org.osgi.service.startlevel.StartLevel sl

admin

protected org.osgi.service.packageadmin.PackageAdmin admin
Constructor Detail

BundleState

public BundleState(org.osgi.framework.BundleContext bc,
                   org.osgi.service.startlevel.StartLevel sl,
                   org.osgi.service.packageadmin.PackageAdmin admin)
Method Detail

getDependencies

public long[] getDependencies(long bundleIdentifier)
                       throws java.io.IOException
Specified by:
getDependencies in interface org.osgi.jmx.core.BundleStateMBean
Throws:
java.io.IOException

getBundles

public javax.management.openmbean.TabularData getBundles()
                                                  throws java.io.IOException
Specified by:
getBundles in interface org.osgi.jmx.core.BundleStateMBean
Throws:
java.io.IOException

getExportedPackages

public java.lang.String[] getExportedPackages(long bundleId)
                                       throws java.io.IOException
Specified by:
getExportedPackages in interface org.osgi.jmx.core.BundleStateMBean
Throws:
java.io.IOException

getFragments

public long[] getFragments(long bundleId)
                    throws java.io.IOException
Specified by:
getFragments in interface org.osgi.jmx.core.BundleStateMBean
Throws:
java.io.IOException

getHeaders

public javax.management.openmbean.TabularData getHeaders(long bundleId)
                                                  throws java.io.IOException
Specified by:
getHeaders in interface org.osgi.jmx.core.BundleStateMBean
Throws:
java.io.IOException

getHosts

public long[] getHosts(long fragment)
                throws java.io.IOException
Specified by:
getHosts in interface org.osgi.jmx.core.BundleStateMBean
Throws:
java.io.IOException

getImportedPackages

public java.lang.String[] getImportedPackages(long bundleId)
                                       throws java.io.IOException
Specified by:
getImportedPackages in interface org.osgi.jmx.core.BundleStateMBean
Throws:
java.io.IOException

getLastModified

public long getLastModified(long bundleId)
                     throws java.io.IOException
Specified by:
getLastModified in interface org.osgi.jmx.core.BundleStateMBean
Throws:
java.io.IOException

getRegisteredServices

public long[] getRegisteredServices(long bundleId)
                             throws java.io.IOException
Specified by:
getRegisteredServices in interface org.osgi.jmx.core.BundleStateMBean
Throws:
java.io.IOException

getRequiringBundles

public long[] getRequiringBundles(long bundleIdentifier)
                           throws java.io.IOException
Specified by:
getRequiringBundles in interface org.osgi.jmx.core.BundleStateMBean
Throws:
java.io.IOException

getServicesInUse

public long[] getServicesInUse(long bundleIdentifier)
                        throws java.io.IOException
Specified by:
getServicesInUse in interface org.osgi.jmx.core.BundleStateMBean
Throws:
java.io.IOException

getStartLevel

public int getStartLevel(long bundleId)
                  throws java.io.IOException
Specified by:
getStartLevel in interface org.osgi.jmx.core.BundleStateMBean
Throws:
java.io.IOException

getState

public java.lang.String getState(long bundleId)
                          throws java.io.IOException
Specified by:
getState in interface org.osgi.jmx.core.BundleStateMBean
Throws:
java.io.IOException

getSymbolicName

public java.lang.String getSymbolicName(long bundleId)
                                 throws java.io.IOException
Specified by:
getSymbolicName in interface org.osgi.jmx.core.BundleStateMBean
Throws:
java.io.IOException

isPersistentlyStarted

public boolean isPersistentlyStarted(long bundleId)
                              throws java.io.IOException
Specified by:
isPersistentlyStarted in interface org.osgi.jmx.core.BundleStateMBean
Throws:
java.io.IOException

isFragment

public boolean isFragment(long bundleId)
                   throws java.io.IOException
Specified by:
isFragment in interface org.osgi.jmx.core.BundleStateMBean
Throws:
java.io.IOException

isRemovalPending

public boolean isRemovalPending(long bundleId)
                         throws java.io.IOException
Specified by:
isRemovalPending in interface org.osgi.jmx.core.BundleStateMBean
Throws:
java.io.IOException

isRequired

public boolean isRequired(long bundleId)
                   throws java.io.IOException
Specified by:
isRequired in interface org.osgi.jmx.core.BundleStateMBean
Throws:
java.io.IOException

addListener

protected void addListener()
Specified by:
addListener in class Monitor

getBundleListener

protected org.osgi.framework.BundleListener getBundleListener()

removeListener

protected void removeListener()
Specified by:
removeListener in class Monitor


Copyright © 2009. All Rights Reserved.