Class: OSGi::ExecutionEnvironmentConfiguration
- Defined in:
- lib/buildr4osgi/osgi/execution_environment.rb
Overview
The execution environment configuration class represents how to dispose of execution environments. The default execution environments are initialized in the constructor.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#available_ee ⇒ Object
Returns the value of attribute available_ee.
-
#execution_environment ⇒ Object
Returns the value of attribute execution_environment.
-
#extra_packages ⇒ Object
Returns the value of attribute extra_packages.
Instance Method Summary collapse
-
#current_execution_environment ⇒ Object
Returns the current execution environment.
-
#initialize ⇒ ExecutionEnvironmentConfiguration
constructor
Constructor.
-
#register_execution_environment(ee) ⇒ Object
Registers an execution enviroment in the configuration.
Constructor Details
#initialize ⇒ ExecutionEnvironmentConfiguration
Constructor
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/buildr4osgi/osgi/execution_environment.rb', line 160 def initialize @extra_packages = [] @available_ee = {} register_execution_environment(NONE) register_execution_environment(CDC10FOUNDATION10) register_execution_environment(CDC10FOUNDATION11) register_execution_environment(J2SE12) register_execution_environment(J2SE13) register_execution_environment(J2SE14) register_execution_environment(J2SE15) register_execution_environment(JAVASE16) register_execution_environment(JAVASE17) register_execution_environment(OSGIMINIMUM10) register_execution_environment(OSGIMINIMUM11) register_execution_environment(OSGIMINIMUM12) @execution_environment = JAVASE16.name end |
Instance Attribute Details
#available_ee ⇒ Object
Returns the value of attribute available_ee.
196 197 198 |
# File 'lib/buildr4osgi/osgi/execution_environment.rb', line 196 def available_ee @available_ee end |
#execution_environment ⇒ Object
Returns the value of attribute execution_environment.
157 158 159 |
# File 'lib/buildr4osgi/osgi/execution_environment.rb', line 157 def execution_environment @execution_environment end |
#extra_packages ⇒ Object
Returns the value of attribute extra_packages.
157 158 159 |
# File 'lib/buildr4osgi/osgi/execution_environment.rb', line 157 def extra_packages @extra_packages end |
Instance Method Details
#current_execution_environment ⇒ Object
Returns the current execution environment. By default we return JavaSE-1.6
184 185 186 |
# File 'lib/buildr4osgi/osgi/execution_environment.rb', line 184 def current_execution_environment @available_ee[@execution_environment] end |
#register_execution_environment(ee) ⇒ Object
Registers an execution enviroment in the configuration. This method should be used to register additional execution environments using an extension.
191 192 193 194 |
# File 'lib/buildr4osgi/osgi/execution_environment.rb', line 191 def register_execution_environment(ee) raise "Cannot register this execution environment" unless ee.is_a? ExecutionEnvironment available_ee[ee.name] = ee end |