com.buglabs.osgi.filesystem.init
Class InitManager

java.lang.Object
  extended by com.buglabs.osgi.filesystem.init.InitManager
All Implemented Interfaces:
ServiceTrackerHelper.ManagedRunnable

public class InitManager
extends java.lang.Object
implements ServiceTrackerHelper.ManagedRunnable


Field Summary
static java.lang.String INSTALL_DIR_STRING
           
static java.lang.String RUN_LEVEL_STRING
           
 
Constructor Summary
InitManager(java.io.File rootDir, LogService log)
           
 
Method Summary
static java.lang.String getDirectoryNameForFile(java.io.File file)
           
 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

RUN_LEVEL_STRING

public static final java.lang.String RUN_LEVEL_STRING
See Also:
Constant Field Values

INSTALL_DIR_STRING

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

InitManager

public InitManager(java.io.File rootDir,
                   LogService log)
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

getDirectoryNameForFile

public static java.lang.String getDirectoryNameForFile(java.io.File file)
                                                throws java.io.IOException
Parameters:
file -
Returns:
The name of the direct parent folder of the file.
Throws:
java.io.IOException