org.jboss.osgi.spi.management
Class ManagedBundle

java.lang.Object
  extended by org.jboss.osgi.spi.management.ManagedBundle
All Implemented Interfaces:
ManagedBundleMBean

public class ManagedBundle
extends java.lang.Object
implements ManagedBundleMBean

The managed view of an OSGi Bundle

Since:
23-Jan-2009
Author:
thomas.diesler@jboss.com

Constructor Summary
ManagedBundle(org.osgi.framework.Bundle bundle)
           
 
Method Summary
 long getBundleId()
          Returns this bundle's unique identifier.
 java.util.Dictionary<java.lang.String,java.lang.String> getHeaders()
          Returns the bundle manifest headers
 javax.management.ObjectName getObjectName()
          Get the bundles object name.
 java.lang.String getProperty(java.lang.String key)
          Returns the value of the specified property from the BundleContext.
 int getState()
          Returns this bundle's current state.
 java.lang.String getSymbolicName()
          Returns the symbolic name of this bundle as specified by its Bundle-SymbolicName manifest header
 void start()
          Starts this bundle with no options
 void stop()
          Stops this bundle with no options.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagedBundle

public ManagedBundle(org.osgi.framework.Bundle bundle)
Method Detail

getObjectName

public javax.management.ObjectName getObjectName()
Description copied from interface: ManagedBundleMBean
Get the bundles object name.

Specified by:
getObjectName in interface ManagedBundleMBean

getProperty

public java.lang.String getProperty(java.lang.String key)
Description copied from interface: ManagedBundleMBean
Returns the value of the specified property from the BundleContext.

Specified by:
getProperty in interface ManagedBundleMBean

getState

public int getState()
Description copied from interface: ManagedBundleMBean
Returns this bundle's current state. A bundle can be in only one state at any time.

Specified by:
getState in interface ManagedBundleMBean
Returns:
An element of UNINSTALLED,INSTALLED, RESOLVED,STARTING, STOPPING,ACTIVE.

getBundleId

public long getBundleId()
Description copied from interface: ManagedBundleMBean
Returns this bundle's unique identifier.

Specified by:
getBundleId in interface ManagedBundleMBean

getSymbolicName

public java.lang.String getSymbolicName()
Description copied from interface: ManagedBundleMBean
Returns the symbolic name of this bundle as specified by its Bundle-SymbolicName manifest header

Specified by:
getSymbolicName in interface ManagedBundleMBean

getHeaders

public java.util.Dictionary<java.lang.String,java.lang.String> getHeaders()
Description copied from interface: ManagedBundleMBean
Returns the bundle manifest headers

Specified by:
getHeaders in interface ManagedBundleMBean

start

public void start()
           throws org.osgi.framework.BundleException
Description copied from interface: ManagedBundleMBean
Starts this bundle with no options

Specified by:
start in interface ManagedBundleMBean
Throws:
org.osgi.framework.BundleException

stop

public void stop()
          throws org.osgi.framework.BundleException
Description copied from interface: ManagedBundleMBean
Stops this bundle with no options.

Specified by:
stop in interface ManagedBundleMBean
Throws:
org.osgi.framework.BundleException


Copyright © 2009. All Rights Reserved.