org.apache.felix.mosgi.managedelements.bundlesprobes
Class BundlesProbes

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by org.apache.felix.mosgi.managedelements.bundlesprobes.BundlesProbes
All Implemented Interfaces:
EventListener, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, TabIfc, BundlesProbesMBean, BundleActivator, BundleListener, ServiceListener

public class BundlesProbes
extends javax.management.NotificationBroadcasterSupport
implements BundleActivator, BundlesProbesMBean, ServiceListener, BundleListener


Constructor Summary
BundlesProbes()
           
 
Method Summary
 void bundleChanged(BundleEvent event)
          Receives notification that a bundle has had a lifecycle change.
 Vector bundleList()
           
 String getBundleName()
           
 void install(String location)
           
 void serviceChanged(ServiceEvent event)
          Receives notification that a service has had a lifecycle change.
 void start(BundleContext context)
          Called when this bundle is started so the Framework can perform the bundle-specific activities necessary to start this bundle.
 void startService(Long[] id)
           
 void stop(BundleContext context)
          Called when this bundle is stopped so the Framework can perform the bundle-specific activities necessary to stop the bundle.
 void stopService(Long[] id)
           
 void uninstall(Long[] id)
           
 void update(Long[] id)
           
 
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
 

Constructor Detail

BundlesProbes

public BundlesProbes()
Method Detail

getBundleName

public String getBundleName()
Specified by:
getBundleName in interface TabIfc

start

public void start(BundleContext context)
           throws Exception
Description copied from interface: BundleActivator
Called when this bundle is started so the Framework can perform the bundle-specific activities necessary to start this bundle. This method can be used to register services or to allocate any resources that this bundle needs.

This method must complete and return to its caller in a timely manner.

Specified by:
start in interface BundleActivator
Parameters:
context - The execution context of the bundle being started.
Throws:
Exception - If this method throws an exception, this bundle is marked as stopped and the Framework will remove this bundle's listeners, unregister all services registered by this bundle, and release all services used by this bundle.

stop

public void stop(BundleContext context)
Description copied from interface: BundleActivator
Called when this bundle is stopped so the Framework can perform the bundle-specific activities necessary to stop the bundle. In general, this method should undo the work that the BundleActivator.start method started. There should be no active threads that were started by this bundle when this bundle returns. A stopped bundle must not call any Framework objects.

This method must complete and return to its caller in a timely manner.

Specified by:
stop in interface BundleActivator
Parameters:
context - The execution context of the bundle being stopped.

bundleList

public Vector bundleList()
Specified by:
bundleList in interface BundlesProbesMBean

startService

public void startService(Long[] id)
Specified by:
startService in interface BundlesProbesMBean

stopService

public void stopService(Long[] id)
Specified by:
stopService in interface BundlesProbesMBean

install

public void install(String location)
Specified by:
install in interface BundlesProbesMBean

uninstall

public void uninstall(Long[] id)
Specified by:
uninstall in interface BundlesProbesMBean

update

public void update(Long[] id)
Specified by:
update in interface BundlesProbesMBean

serviceChanged

public void serviceChanged(ServiceEvent event)
Description copied from interface: ServiceListener
Receives notification that a service has had a lifecycle change.

Specified by:
serviceChanged in interface ServiceListener
Parameters:
event - The ServiceEvent object.

bundleChanged

public void bundleChanged(BundleEvent event)
Description copied from interface: BundleListener
Receives notification that a bundle has had a lifecycle change.

Specified by:
bundleChanged in interface BundleListener
Parameters:
event - The BundleEvent.


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.