com.buglabs.osgi.filesystem.status
Class StatusManager

java.lang.Object
  extended by com.buglabs.osgi.filesystem.status.StatusManager
All Implemented Interfaces:
ServiceTrackerHelper.ManagedInlineRunnable, ServiceTrackerHelper.ManagedRunnable

public class StatusManager
extends java.lang.Object
implements ServiceTrackerHelper.ManagedInlineRunnable

Creates and destroyes the status files that can be read by clients to inspect the runtime-state of the OSGi instance.


Field Summary
static java.lang.String STATUS_DIR_NAME
           
 
Constructor Summary
StatusManager(java.io.File root, BundleContext context)
           
 
Method Summary
 void bundleChanged(BundleEvent arg0)
           
 void run(java.util.Map services)
          This is called for execution of application logic when OSGi services are available.
 void shutdown()
          Called directly before the thread is interrupted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_DIR_NAME

public static final java.lang.String STATUS_DIR_NAME
See Also:
Constant Field Values
Constructor Detail

StatusManager

public StatusManager(java.io.File root,
                     BundleContext context)
              throws java.io.IOException
Throws:
java.io.IOException
Method Detail

run

public void run(java.util.Map services)
Description copied from interface: ServiceTrackerHelper.ManagedRunnable
This is called for execution of application logic when OSGi services are available.

Specified by:
run in interface ServiceTrackerHelper.ManagedRunnable
Parameters:
services - key contains String of service name, value is service instance.

shutdown

public void shutdown()
Description copied from interface: ServiceTrackerHelper.ManagedRunnable
Called directly before the thread is interrupted. Client may optionally add necessary code to shutdown thread.

Specified by:
shutdown in interface ServiceTrackerHelper.ManagedRunnable

bundleChanged

public void bundleChanged(BundleEvent arg0)