org.jboss.osgi.spi.management
Class ManagedBundle

java.lang.Object
  extended by org.jboss.osgi.spi.management.ManagedBundle
All Implemented Interfaces:
RemoteBundle, 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.
 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
clone, equals, finalize, 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: RemoteBundle
Returns the value of the specified property from the BundleContext.

Specified by:
getProperty in interface RemoteBundle

getState

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

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

getBundleId

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

Specified by:
getBundleId in interface RemoteBundle

getSymbolicName

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

Specified by:
getSymbolicName in interface RemoteBundle

start

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

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

stop

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

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


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.