org.ops4j.pax.runner.platform.internal
Class PlatformImpl

java.lang.Object
  extended by org.ops4j.pax.runner.platform.internal.PlatformImpl
All Implemented Interfaces:
Platform

public class PlatformImpl
extends java.lang.Object
implements Platform

Handles the workflow of creating the platform. Concrete platforms should implement only the PlatformBuilder interface. TODO Add unit tests

Since:
August 19, 2007
Author:
Alin Dreghiciu, Stuart McCulloch

Constructor Summary
PlatformImpl(PlatformBuilder platformBuilder, org.osgi.framework.BundleContext bundleContext)
          Creates a new platform.
 
Method Summary
 void setResolver(org.ops4j.util.property.PropertyResolver propertyResolver)
          Sets the propertyResolver to use.
 void start(java.util.List<BundleReference> bundles, java.util.Properties properties, java.util.Dictionary config)
          Starts the platform using the internal Java runner service and waits for it to exit.
 void start(java.util.List<BundleReference> bundles, java.util.Properties properties, java.util.Dictionary config, JavaRunner runner)
          Starts the platform using an external Java runner service, which may not wait for it to exit.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PlatformImpl

public PlatformImpl(PlatformBuilder platformBuilder,
                    org.osgi.framework.BundleContext bundleContext)
Creates a new platform.

Parameters:
platformBuilder - concrete platform builder; mandatory
bundleContext - a bundle context
Method Detail

setResolver

public void setResolver(org.ops4j.util.property.PropertyResolver propertyResolver)
Sets the propertyResolver to use.

Parameters:
propertyResolver - a propertyResolver

start

public void start(java.util.List<BundleReference> bundles,
                  java.util.Properties properties,
                  java.util.Dictionary config)
           throws PlatformException
Description copied from interface: Platform
Starts the platform using the internal Java runner service and waits for it to exit.

Specified by:
start in interface Platform
Parameters:
bundles - a list of bundles to be included in the target platform; optional
properties - platform properties to be available in the started platform; optional
config - service configuration properties
Throws:
PlatformException - if something goes wrong
See Also:
Platform.start(java.util.List,java.util.Properties,Dictionary)

start

public void start(java.util.List<BundleReference> bundles,
                  java.util.Properties properties,
                  java.util.Dictionary config,
                  JavaRunner runner)
           throws PlatformException
Description copied from interface: Platform
Starts the platform using an external Java runner service, which may not wait for it to exit.

Specified by:
start in interface Platform
Parameters:
bundles - a list of bundles to be included in the target platform; optional
properties - platform properties to be available in the started platform; optional
config - service configuration properties
runner - an external service to run Java programs
Throws:
PlatformException - if something goes wrong
See Also:
Platform.start(java.util.List,java.util.Properties,Dictionary,JavaRunner)

toString

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


Copyright © 2008. All Rights Reserved.