org.ops4j.pax.runner
Class ContextImpl

java.lang.Object
  extended by org.ops4j.pax.runner.ContextImpl
All Implemented Interfaces:
Context

public class ContextImpl
extends java.lang.Object
implements Context

Bean like implementation of context. TODO add unit testing

Since:
August 29, 2007
Author:
Alin Dreghiciu

Constructor Summary
ContextImpl()
          Create a new Context implementation.
 
Method Summary
 Context addBundle(RunnerBundle bundle)
          Adds a runner bundle to the list of bunsles to be installed in the platform
 java.util.List<RunnerBundle> getBundles()
          Returns a list of runner bundles to be installed.
 CommandLine getCommandLine()
          Returns the command line in use.
 Configuration getConfiguration()
          Returns the configuration in use.
 org.apache.felix.framework.util.EventDispatcher getEventDispatcher()
          Returns the event dispatcher in use.
 OptionResolver getOptionResolver()
          Returns the option resolver in use.
 org.apache.felix.framework.ServiceRegistry getServiceRegistry()
          Returns the service registry in use.
 java.util.Properties getSystemProperties()
          Returns the system properties to be used for starting the platform.
 Context setCommandLine(CommandLine commandLine)
          Sets the command line in use.
 Context setConfiguration(Configuration configuration)
          Sets the configuration in use.
 Context setEventDispatcher(org.apache.felix.framework.util.EventDispatcher dispatcher)
          Sets the event dispatcher in use.
 Context setOptionResolver(OptionResolver optionResolver)
          Sets the option resolver in use.
 Context setServiceRegistry(org.apache.felix.framework.ServiceRegistry serviceRegistry)
          Sets the service registry in use.
 Context setSystemProperties(java.util.Properties properties)
          Sets the system properties that will be used when starting the platform.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextImpl

public ContextImpl()
Create a new Context implementation.

Method Detail

getCommandLine

public CommandLine getCommandLine()
Returns the command line in use.

Specified by:
getCommandLine in interface Context
Returns:
a command line

setCommandLine

public Context setCommandLine(CommandLine commandLine)
Sets the command line in use.

Specified by:
setCommandLine in interface Context
Parameters:
commandLine - a command line
Returns:
self, for fluent api.

getConfiguration

public Configuration getConfiguration()
Returns the configuration in use.

Specified by:
getConfiguration in interface Context
Returns:
a configuration

setConfiguration

public Context setConfiguration(Configuration configuration)
Sets the configuration in use.

Specified by:
setConfiguration in interface Context
Parameters:
configuration - a configuration
Returns:
self, for fluent api.

getOptionResolver

public OptionResolver getOptionResolver()
Returns the option resolver in use.

Specified by:
getOptionResolver in interface Context
Returns:
an option resolver

setOptionResolver

public Context setOptionResolver(OptionResolver optionResolver)
Sets the option resolver in use.

Specified by:
setOptionResolver in interface Context
Parameters:
optionResolver - an option resolver
Returns:
self, for fluent api.

getServiceRegistry

public org.apache.felix.framework.ServiceRegistry getServiceRegistry()
Returns the service registry in use.

Specified by:
getServiceRegistry in interface Context
Returns:
a service registry

setServiceRegistry

public Context setServiceRegistry(org.apache.felix.framework.ServiceRegistry serviceRegistry)
Sets the service registry in use.

Specified by:
setServiceRegistry in interface Context
Parameters:
serviceRegistry - a service registry
Returns:
self, for fluent api.

getEventDispatcher

public org.apache.felix.framework.util.EventDispatcher getEventDispatcher()
Returns the event dispatcher in use.

Specified by:
getEventDispatcher in interface Context
Returns:
a event dispatcher

setEventDispatcher

public Context setEventDispatcher(org.apache.felix.framework.util.EventDispatcher dispatcher)
Sets the event dispatcher in use.

Specified by:
setEventDispatcher in interface Context
Parameters:
dispatcher - an event dispatcher
Returns:
self, for fluent api.

addBundle

public Context addBundle(RunnerBundle bundle)
Adds a runner bundle to the list of bunsles to be installed in the platform

Specified by:
addBundle in interface Context
Parameters:
bundle - a runner bundle to add
Returns:
self, for fluent api.

getBundles

public java.util.List<RunnerBundle> getBundles()
Returns a list of runner bundles to be installed.

Specified by:
getBundles in interface Context
Returns:
a list of runner bundles

setSystemProperties

public Context setSystemProperties(java.util.Properties properties)
Sets the system properties that will be used when starting the platform.

Specified by:
setSystemProperties in interface Context
Parameters:
properties - java Properties
Returns:
self, for fluent api

getSystemProperties

public java.util.Properties getSystemProperties()
Returns the system properties to be used for starting the platform.

Specified by:
getSystemProperties in interface Context
Returns:
java Properties


Copyright © 2006-2012 OPS4J - Open Participation Software for Java. All Rights Reserved.