org.ow2.util.maven.osgi.launcher.api
Interface IFramework


public interface IFramework

Interface that needs to be implemented for the implementation in the framework.

Author:
Florent BENOIT

Method Summary
 void configure(java.net.URL config)
          Configure the Felix gateway by using the given configuration file.
 org.osgi.framework.BundleContext getBundleContext()
          Gets the bundle context of the framework.
 boolean isRunning()
          Checks if the framework is running.
 void setWorkingDirectory(java.io.File workingDirectory)
          Sets the working directory.
 void start()
          Start the framework.
 void stop()
          Stop the framework.
 

Method Detail

configure

void configure(java.net.URL config)
               throws FrameworkException
Configure the Felix gateway by using the given configuration file.

Parameters:
config - the URL of the configuration file to use
Throws:
FrameworkException - if the configuration is not done

start

void start()
           throws FrameworkException
Start the framework.

Throws:
FrameworkException - if the framework can't be started.

getBundleContext

org.osgi.framework.BundleContext getBundleContext()
Gets the bundle context of the framework.

Returns:
the bundle context allowing to do some operations.

isRunning

boolean isRunning()
Checks if the framework is running.

Returns:
true if the framework is running

stop

void stop()
          throws FrameworkException
Stop the framework.

Throws:
FrameworkException - if the framework can't be stopped.

setWorkingDirectory

void setWorkingDirectory(java.io.File workingDirectory)
Sets the working directory.

Parameters:
workingDirectory - the given directory used to store some files.


Copyright © 2007-2009 OW2 Consortium. All Rights Reserved.