org.ops4j.pax.runner.platform.equinox.internal
Class EquinoxPlatformBuilder

java.lang.Object
  extended by org.ops4j.pax.runner.platform.equinox.internal.EquinoxPlatformBuilder
All Implemented Interfaces:
PlatformBuilder

public class EquinoxPlatformBuilder
extends java.lang.Object
implements PlatformBuilder

Platform builder for equinox platform.

Since:
August 20, 2007
Author:
Alin Dreghiciu

Constructor Summary
EquinoxPlatformBuilder(org.osgi.framework.BundleContext bundleContext, java.lang.String version)
          Create a new equinux platform builder.
 
Method Summary
 java.lang.String[] getArguments(PlatformContext context)
          Returns an array of platform specific startup arguments.
 java.io.InputStream getDefinition()
          Retuns an input stream out of the definition file to be used.
 java.lang.String getMainClassName()
          Returns the name of the main class of the platform, class that will be used to fire up the platform.
 java.lang.String getProviderName()
          Returns the name of the provider (e.g.
 java.lang.String getProviderVersion()
          Returns the version of the provider (e.g.
 java.lang.String getRequiredProfile(PlatformContext context)
          Return null as there is no profile required by equinox.
 java.lang.String[] getVMOptions(PlatformContext context)
          Returns an array of virtual machine options specific to platform as -D.
 void prepare(PlatformContext context)
          Creates a config.ini file under the working directory/equinox directory.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EquinoxPlatformBuilder

public EquinoxPlatformBuilder(org.osgi.framework.BundleContext bundleContext,
                              java.lang.String version)
Create a new equinux platform builder.

Parameters:
bundleContext - a bundle context
version - supported version
Method Detail

prepare

public void prepare(PlatformContext context)
             throws PlatformException
Creates a config.ini file under the working directory/equinox directory.

Specified by:
prepare in interface PlatformBuilder
Parameters:
context - context information
Throws:
PlatformException - if something goes wrong durring building the platform
See Also:
#prepare(org.ops4j.pax.runner.platform.PlatformContext)

getMainClassName

public java.lang.String getMainClassName()
Description copied from interface: PlatformBuilder
Returns the name of the main class of the platform, class that will be used to fire up the platform.

Specified by:
getMainClassName in interface PlatformBuilder
Returns:
main class name
See Also:
PlatformBuilder.getMainClassName()

getArguments

public java.lang.String[] getArguments(PlatformContext context)
Description copied from interface: PlatformBuilder
Returns an array of platform specific startup arguments. This are appended to the startup command.

Specified by:
getArguments in interface PlatformBuilder
Parameters:
context - context information
Returns:
an array of arguments
See Also:
#getArguments(org.ops4j.pax.runner.platform.PlatformContext)

getVMOptions

public java.lang.String[] getVMOptions(PlatformContext context)
Description copied from interface: PlatformBuilder
Returns an array of virtual machine options specific to platform as -D.

Specified by:
getVMOptions in interface PlatformBuilder
Parameters:
context - context information
Returns:
an array of system properties
See Also:
#getVMOptions(org.ops4j.pax.runner.platform.PlatformContext)

getDefinition

public java.io.InputStream getDefinition()
                                  throws java.io.IOException
Description copied from interface: PlatformBuilder
Retuns an input stream out of the definition file to be used.

Specified by:
getDefinition in interface PlatformBuilder
Returns:
an input stream
Throws:
java.io.IOException - if the input stream could not be opened.
See Also:
PlatformBuilder.getDefinition()

getRequiredProfile

public java.lang.String getRequiredProfile(PlatformContext context)
Return null as there is no profile required by equinox.

Specified by:
getRequiredProfile in interface PlatformBuilder
Parameters:
context - context information
Returns:
a comma separated list of profiles
See Also:
#getRequiredProfile(org.ops4j.pax.runner.platform.PlatformContext)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

getProviderName

public java.lang.String getProviderName()
Description copied from interface: PlatformBuilder
Returns the name of the provider (e.g. felix, equionox)

Specified by:
getProviderName in interface PlatformBuilder
Returns:
name of the provider
See Also:
PlatformBuilder.getProviderName()

getProviderVersion

public java.lang.String getProviderVersion()
Description copied from interface: PlatformBuilder
Returns the version of the provider (e.g. 1.0, 3.3.0)

Specified by:
getProviderVersion in interface PlatformBuilder
Returns:
version of the provider
See Also:
PlatformBuilder.getProviderVersion()


Copyright © 2008. All Rights Reserved.