1 package org
.argeo
.slc
.osgi
;
3 import java
.lang
.management
.ManagementFactory
;
4 import java
.util
.ArrayList
;
5 import java
.util
.Dictionary
;
6 import java
.util
.Enumeration
;
7 import java
.util
.HashMap
;
8 import java
.util
.HashSet
;
9 import java
.util
.Iterator
;
10 import java
.util
.List
;
14 import javax
.management
.MBeanServer
;
15 import javax
.management
.ObjectName
;
16 import javax
.management
.StandardMBean
;
18 import org
.argeo
.api
.cms
.CmsLog
;
19 import org
.argeo
.slc
.DefaultNameVersion
;
20 import org
.argeo
.slc
.NameVersion
;
21 import org
.argeo
.slc
.SlcException
;
22 import org
.argeo
.slc
.core
.execution
.DefaultExecutionFlowDescriptorConverter
;
23 import org
.argeo
.slc
.deploy
.Module
;
24 import org
.argeo
.slc
.deploy
.ModuleDescriptor
;
25 import org
.argeo
.slc
.execution
.ExecutionContext
;
26 import org
.argeo
.slc
.execution
.ExecutionFlow
;
27 import org
.argeo
.slc
.execution
.ExecutionFlowDescriptor
;
28 import org
.argeo
.slc
.execution
.ExecutionFlowDescriptorConverter
;
29 import org
.argeo
.slc
.execution
.ExecutionModuleDescriptor
;
30 import org
.argeo
.slc
.execution
.ExecutionModulesListener
;
31 import org
.argeo
.slc
.execution
.RealizedFlow
;
32 import org
.argeo
.slc
.runtime
.AbstractExecutionModulesManager
;
33 import org
.eclipse
.gemini
.blueprint
.service
.importer
.OsgiServiceLifecycleListener
;
34 import org
.osgi
.framework
.Bundle
;
35 import org
.osgi
.framework
.BundleEvent
;
36 import org
.osgi
.framework
.BundleException
;
37 import org
.osgi
.framework
.BundleListener
;
38 import org
.osgi
.framework
.Constants
;
39 import org
.osgi
.framework
.launch
.Framework
;
40 import org
.springframework
.context
.ApplicationContext
;
42 /** Execution modules manager implementation based on an OSGi runtime. */
43 public class OsgiExecutionModulesManager
extends
44 AbstractExecutionModulesManager
implements
45 OsgiServiceLifecycleListener
, BundleListener
{
47 private final static CmsLog log
= CmsLog
48 .getLog(OsgiExecutionModulesManager
.class);
50 private BundlesManager bundlesManager
;
51 private Map
<OsgiBundle
, ExecutionContext
> executionContexts
= new HashMap
<OsgiBundle
, ExecutionContext
>();
52 private Map
<OsgiBundle
, ExecutionFlowDescriptorConverter
> executionFlowDescriptorConverters
= new HashMap
<OsgiBundle
, ExecutionFlowDescriptorConverter
>();
53 private Map
<OsgiBundle
, Set
<ExecutionFlow
>> executionFlows
= new HashMap
<OsgiBundle
, Set
<ExecutionFlow
>>();
54 private ExecutionFlowDescriptorConverter defaultDescriptorConverter
= new DefaultExecutionFlowDescriptorConverter();
56 private List
<ExecutionModulesListener
> executionModulesListeners
= new ArrayList
<ExecutionModulesListener
>();
58 private Boolean registerFlowsToJmx
= false;
60 public void init() throws Exception
{
61 bundlesManager
.getBundleContext().addBundleListener(this);
63 final String module
= System
.getProperty(UNIQUE_LAUNCH_MODULE_PROPERTY
);
64 final String flow
= System
.getProperty(UNIQUE_LAUNCH_FLOW_PROPERTY
);
66 // launch a flow and stops
67 new Thread("Unique Flow") {
70 executeFlowAndExit(module
, null, flow
);
76 public void destroy() {
77 bundlesManager
.getBundleContext().removeBundleListener(this);
80 /** Executes a single flow and <b>stops the JVM</b> */
81 protected void executeFlowAndExit(final String module
,
82 final String version
, final String flow
) {
83 if (log
.isDebugEnabled())
84 log
.debug("Launch unique flow " + flow
+ " from module " + module
);
86 OsgiBundle osgiBundle
= bundlesManager
.findFromPattern(module
);
87 if (osgiBundle
== null)
88 throw new SlcException("No OSGi bundle found for " + module
);
89 // Bundle moduleBundle =
90 // bundlesManager.findRelatedBundle(osgiBundle);
93 RealizedFlow lastLaunch
= findRealizedFlow(module
, flow
);
94 if (lastLaunch
== null)
95 throw new SlcException("Cannot find launch for " + module
+ " "
98 } catch (Exception e
) {
100 "Error in unique flow " + flow
+ " from module " + module
,
103 if (log
.isDebugEnabled())
104 log
.debug("Shutdown OSGi runtime...");
105 Framework framework
= (Framework
) bundlesManager
.getBundleContext()
108 // shutdown framework
110 // wait 1 min for shutdown
111 framework
.waitForStop(60 * 1000);
114 } catch (Exception e
) {
121 // public void startExectionModule(String moduleName, String moduleVersion)
124 // ServiceReference[] sr = bundlesManager.getServiceRefSynchronous(
125 // ApplicationContext.class.getName(),
126 // "org.springframework.context.service.name=" + moduleName);
127 // // bundlesManager.startSynchronous(moduleBundle);
128 // if (sr == null || sr.length == 0)
129 // throw new SlcException(
130 // "Cannot find execution module application context "
132 // } catch (InvalidSyntaxException e) {
133 // throw new SlcException("Cannot start exeuction module "
138 public synchronized ExecutionModuleDescriptor
getExecutionModuleDescriptor(
139 String moduleName
, String version
) {
140 ExecutionModuleDescriptor md
= new ExecutionModuleDescriptor();
141 OsgiBundle osgiBundle
= null;
142 DefaultNameVersion nameVersion
= new DefaultNameVersion(moduleName
,
144 bundles
: for (Iterator
<OsgiBundle
> iterator
= executionContexts
145 .keySet().iterator(); iterator
.hasNext();) {
146 OsgiBundle ob
= iterator
.next();
147 if (nameVersion
.getVersion() != null) {
148 if (ob
.equals(nameVersion
)) {
153 if (ob
.getName().equals(nameVersion
.getName())) {
159 if (osgiBundle
== null)
160 throw new SlcException("No execution module registered for "
162 md
.setName(osgiBundle
.getName());
163 md
.setVersion(osgiBundle
.getVersion());
164 md
.setTitle(osgiBundle
.getTitle());
165 md
.setDescription(osgiBundle
.getDescription());
167 ExecutionFlowDescriptorConverter executionFlowDescriptorConverter
= getExecutionFlowDescriptorConverter(
168 moduleName
, version
);
169 if (executionFlowDescriptorConverter
== null)
170 throw new SlcException("No flow converter found.");
171 executionFlowDescriptorConverter
.addFlowsToDescriptor(md
,
172 listFlows(moduleName
, version
));
176 public synchronized List
<ExecutionModuleDescriptor
> listExecutionModules() {
177 List
<ExecutionModuleDescriptor
> descriptors
= new ArrayList
<ExecutionModuleDescriptor
>();
179 for (Iterator
<OsgiBundle
> iterator
= executionContexts
.keySet()
180 .iterator(); iterator
.hasNext();) {
181 OsgiBundle osgiBundle
= iterator
.next();
182 ExecutionModuleDescriptor md
= new ExecutionModuleDescriptor();
183 setMetadataFromBundle(md
,
184 bundlesManager
.findRelatedBundle(osgiBundle
));
190 protected synchronized Map
<String
, ExecutionFlow
> listFlows(
191 String moduleName
, String moduleVersion
) {
193 Map
<String
, ExecutionFlow
> flows
= new HashMap
<String
, ExecutionFlow
>();
194 OsgiBundle key
= bundlesManager
.findRelatedBundle(moduleName
,
196 if (!executionFlows
.containsKey(key
))
198 Set
<ExecutionFlow
> flowsT
= executionFlows
.get(key
);
199 for (ExecutionFlow flow
: flowsT
)
200 flows
.put(flow
.getName(), flow
);
204 protected ExecutionFlow
findExecutionFlow(String moduleName
,
205 String moduleVersion
, String flowName
) {
206 String filter
= moduleVersion
== null || moduleVersion
.equals("0.0.0") ?
"(&(Bundle-SymbolicName="
208 + ")(org.eclipse.gemini.blueprint.bean.name="
210 : "(&(Bundle-SymbolicName=" + moduleName
+ ")(Bundle-Version="
212 + ")(org.eclipse.gemini.blueprint.bean.name="
214 return bundlesManager
.getSingleServiceStrict(ExecutionFlow
.class,
218 protected ExecutionContext
findExecutionContext(String moduleName
,
219 String moduleVersion
) {
220 String filter
= moduleFilter(moduleName
, moduleVersion
);
221 return bundlesManager
.getSingleServiceStrict(ExecutionContext
.class,
225 protected ExecutionFlowDescriptorConverter
findExecutionFlowDescriptorConverter(
226 String moduleName
, String moduleVersion
) {
227 String filter
= moduleFilter(moduleName
, moduleVersion
);
228 return bundlesManager
.getSingleService(
229 ExecutionFlowDescriptorConverter
.class, filter
, false);
232 /** Only based on symbolic name if version is null or "0.0.0" */
233 protected String
moduleFilter(String moduleName
, String moduleVersion
) {
234 return moduleVersion
== null || moduleVersion
.equals("0.0.0") ?
"(Bundle-SymbolicName="
236 : "(&(Bundle-SymbolicName=" + moduleName
+ ")(Bundle-Version="
237 + moduleVersion
+ "))";
242 * Builds a minimal realized flow, based on the provided information
243 * (typically from the command line).
246 * a bundle id, or a pattern contained in a bundle symbolic name
248 * the execution flow name
249 * @return a minimal realized flow, to be used in an execution
251 public RealizedFlow
findRealizedFlow(String module
, String executionName
) {
252 // First check whether we have a bundleId
253 Long bundleId
= null;
255 bundleId
= Long
.parseLong(module
);
256 } catch (NumberFormatException e
) {
260 // Look for bundle names containing pattern
261 OsgiBundle bundle
= null;
262 if (bundleId
!= null) {
263 bundle
= bundlesManager
.getBundle(bundleId
);
265 bundle
= bundlesManager
.findFromPattern(module
);
268 if (bundle
!= null) {
269 RealizedFlow launch
= new RealizedFlow();
270 launch
.setModuleName(bundle
.getName());
271 launch
.setModuleVersion(bundle
.getVersion());
272 ExecutionFlowDescriptor descriptor
= new ExecutionFlowDescriptor();
273 descriptor
.setName(executionName
);
274 launch
.setFlowDescriptor(descriptor
);
277 log
.warn("Could not find any execution module matching these requirements.");
282 public void upgrade(NameVersion nameVersion
) {
283 OsgiBundle osgiBundle
= new OsgiBundle(nameVersion
);
284 bundlesManager
.upgradeSynchronous(osgiBundle
);
287 protected synchronized ExecutionFlowDescriptorConverter
getExecutionFlowDescriptorConverter(
288 String moduleName
, String moduleVersion
) {
289 return findExecutionFlowDescriptorConverter(moduleName
, moduleVersion
);
290 // OsgiBundle osgiBundle = new OsgiBundle(moduleName, moduleVersion);
291 // return getExecutionFlowDescriptorConverter(osgiBundle);
294 protected synchronized ExecutionFlowDescriptorConverter
getExecutionFlowDescriptorConverter(
295 OsgiBundle osgiBundle
) {
296 if (executionFlowDescriptorConverters
.containsKey(osgiBundle
))
297 return executionFlowDescriptorConverters
.get(osgiBundle
);
299 return defaultDescriptorConverter
;
302 public ModuleDescriptor
getModuleDescriptor(String moduleName
,
304 return getExecutionModuleDescriptor(moduleName
, version
);
307 public List
<ModuleDescriptor
> listModules() {
308 Bundle
[] bundles
= bundlesManager
.getBundleContext().getBundles();
309 List
<ModuleDescriptor
> lst
= new ArrayList
<ModuleDescriptor
>();
310 for (Bundle bundle
: bundles
) {
311 ModuleDescriptor moduleDescriptor
= new ModuleDescriptor();
312 setMetadataFromBundle(moduleDescriptor
, bundle
);
313 lst
.add(moduleDescriptor
);
318 public void start(NameVersion nameVersion
) {
320 Bundle bundle
= bundlesManager
.findRelatedBundle(new OsgiBundle(
323 throw new SlcException("Could not find bundle for "
326 bundlesManager
.startSynchronous(bundle
);
327 if (isSpringInstrumented(bundle
)) {
328 // Wait for Spring application context to be ready
329 String filter
= "(Bundle-SymbolicName="
330 + bundle
.getSymbolicName() + ")";
332 bundlesManager
.getServiceRefSynchronous(
333 ApplicationContext
.class, filter
);
334 } catch (Exception e
) {
335 // stop if application context not found
340 } catch (Exception e
) {
341 throw new SlcException("Cannot start " + nameVersion
, e
);
345 /** Do it calmly in order to avoid NPE */
346 private Boolean
isSpringInstrumented(Bundle bundle
) {
347 Dictionary
<?
, ?
> headers
= bundle
.getHeaders();
348 if (headers
!= null && headers
.get("Spring-Context") != null)
350 Enumeration
<?
> springEntryPaths
= bundle
351 .getEntryPaths("/META-INF/spring");
352 if (springEntryPaths
!= null && springEntryPaths
.hasMoreElements())
357 public void stop(NameVersion nameVersion
) {
359 Bundle bundle
= bundlesManager
.findRelatedBundle(new OsgiBundle(
361 bundlesManager
.stopSynchronous(bundle
);
362 } catch (BundleException e
) {
363 throw new SlcException("Cannot stop " + nameVersion
, e
);
367 protected void setMetadataFromBundle(ModuleDescriptor md
, Bundle bundle
) {
370 if (md
.getName() == null || md
.getVersion() == null)
371 throw new SlcException("Name and version not available.");
373 Bundle
[] bundles
= bundlesManager
.getBundleContext().getBundles();
374 for (Bundle b
: bundles
) {
375 if (b
.getSymbolicName().equals(md
.getName())
376 && md
.getVersion().equals(
377 getHeaderSafe(b
, Constants
.BUNDLE_VERSION
))) {
386 throw new SlcException("Cannot find bundle.");
388 md
.setName(bdl
.getSymbolicName());
389 md
.setVersion(getHeaderSafe(bdl
, Constants
.BUNDLE_VERSION
));
390 md
.setTitle(getHeaderSafe(bdl
, Constants
.BUNDLE_NAME
));
391 md
.setDescription(getHeaderSafe(bdl
, Constants
.BUNDLE_DESCRIPTION
));
393 // copy manifets header to meta data
394 Dictionary
<?
, ?
> headers
= bundle
.getHeaders();
395 Enumeration
<?
> keys
= headers
.keys();
396 while (keys
.hasMoreElements()) {
397 Object key
= keys
.nextElement();
398 Object value
= headers
.get(key
);
400 md
.getMetadata().put(key
.toString(), value
.toString());
404 if (bundle
.getState() == Bundle
.ACTIVE
405 || bundle
.getState() == Bundle
.STARTING
)
408 md
.setStarted(false);
411 private String
getHeaderSafe(Bundle bundle
, Object key
) {
412 Object obj
= bundle
.getHeaders().get(key
);
416 return obj
.toString();
423 /** Registers an execution context. */
424 public synchronized void register(ExecutionContext executionContext
,
425 Map
<String
, String
> properties
) {
426 OsgiBundle osgiBundle
= asOsgiBundle(properties
);
427 Bundle bundle
= bundlesManager
.findRelatedBundle(osgiBundle
);
428 osgiBundle
.setTitle(getHeaderSafe(bundle
, Constants
.BUNDLE_NAME
));
429 osgiBundle
.setDescription(getHeaderSafe(bundle
,
430 Constants
.BUNDLE_DESCRIPTION
));
431 executionContexts
.put(osgiBundle
, executionContext
);
432 if (log
.isTraceEnabled())
433 log
.trace("Registered execution context from " + osgiBundle
);
435 ModuleDescriptor md
= osgiBundle
.getModuleDescriptor();
437 for (ExecutionModulesListener listener
: executionModulesListeners
)
438 listener
.executionModuleAdded(md
);
441 /** Unregisters an execution context. */
442 public synchronized void unregister(ExecutionContext executionContext
,
443 Map
<String
, String
> properties
) {
444 // FIXME why are properties null?
445 if (properties
== null)
447 OsgiBundle osgiBundle
= asOsgiBundle(properties
);
448 if (executionContexts
.containsKey(osgiBundle
)) {
449 executionContexts
.remove(osgiBundle
);
450 if (log
.isTraceEnabled())
451 log
.trace("Removed execution context from " + osgiBundle
);
453 ModuleDescriptor md
= osgiBundle
.getModuleDescriptor();
454 md
.setStarted(false);
455 for (ExecutionModulesListener listener
: executionModulesListeners
)
456 listener
.executionModuleRemoved(md
);
460 /** Registers an execution flow. */
461 public synchronized void register(ExecutionFlow executionFlow
,
462 Map
<String
, String
> properties
) {
463 OsgiBundle osgiBundle
= asOsgiBundle(properties
);
464 if (!executionFlows
.containsKey(osgiBundle
)) {
465 executionFlows
.put(osgiBundle
, new HashSet
<ExecutionFlow
>());
467 executionFlows
.get(osgiBundle
).add(executionFlow
);
468 if (log
.isTraceEnabled())
469 log
.trace("Registered " + executionFlow
+ " from " + osgiBundle
);
472 if (registerFlowsToJmx
)
473 registerMBean(osgiBundle
, executionFlow
);
474 ExecutionFlowDescriptorConverter efdc
= getExecutionFlowDescriptorConverter(osgiBundle
);
475 for (ExecutionModulesListener listener
: executionModulesListeners
)
476 listener
.executionFlowAdded(osgiBundle
.getModuleDescriptor(),
477 efdc
.getExecutionFlowDescriptor(executionFlow
));
480 /** Unregisters an execution flow. */
481 public synchronized void unregister(ExecutionFlow executionFlow
,
482 Map
<String
, String
> properties
) {
483 // FIXME why are properties null?
484 if (properties
== null)
486 OsgiBundle osgiBundle
= asOsgiBundle(properties
);
487 if (executionFlows
.containsKey(osgiBundle
)) {
488 Set
<ExecutionFlow
> flows
= executionFlows
.get(osgiBundle
);
489 flows
.remove(executionFlow
);
490 if (log
.isTraceEnabled())
491 log
.trace("Removed " + executionFlow
+ " from " + osgiBundle
);
492 if (flows
.size() == 0) {
493 executionFlows
.remove(osgiBundle
);
494 if (log
.isTraceEnabled())
495 log
.trace("Removed flows set from " + osgiBundle
);
499 if (registerFlowsToJmx
)
500 unregisterMBean(osgiBundle
, executionFlow
);
501 ExecutionFlowDescriptorConverter efdc
= getExecutionFlowDescriptorConverter(osgiBundle
);
502 for (ExecutionModulesListener listener
: executionModulesListeners
)
503 listener
.executionFlowRemoved(osgiBundle
.getModuleDescriptor(),
504 efdc
.getExecutionFlowDescriptor(executionFlow
));
508 /** Registers an execution module listener. */
509 public synchronized void register(
510 ExecutionModulesListener executionModulesListener
,
511 Map
<String
, String
> properties
) {
512 // sync with current state
513 for (OsgiBundle osgiBundle
: executionContexts
.keySet()) {
514 executionModulesListener
.executionModuleAdded(osgiBundle
515 .getModuleDescriptor());
517 for (OsgiBundle osgiBundle
: executionFlows
.keySet()) {
518 ExecutionFlowDescriptorConverter efdc
= getExecutionFlowDescriptorConverter(osgiBundle
);
519 for (ExecutionFlow executionFlow
: executionFlows
.get(osgiBundle
))
520 executionModulesListener
.executionFlowAdded(
521 osgiBundle
.getModuleDescriptor(),
522 efdc
.getExecutionFlowDescriptor(executionFlow
));
524 executionModulesListeners
.add(executionModulesListener
);
527 /** Unregisters an execution module listener. */
528 public synchronized void unregister(
529 ExecutionModulesListener executionModulesListener
,
530 Map
<String
, String
> properties
) {
531 executionModulesListeners
.remove(executionModulesListener
);
535 * INTERFACE IMPLEMENTATIONS
538 public void bundleChanged(BundleEvent evt
) {
539 Bundle bundle
= evt
.getBundle();
540 if (bundle
.getHeaders().get(
541 ExecutionModuleDescriptor
.SLC_EXECUTION_MODULE
) != null) {
542 OsgiBundle osgiBundle
= new OsgiBundle(bundle
);
543 if (evt
.getType() == BundleEvent
.INSTALLED
)
544 for (ExecutionModulesListener listener
: executionModulesListeners
)
545 listener
.executionModuleAdded(osgiBundle
546 .getModuleDescriptor());
547 else if (evt
.getType() == BundleEvent
.UNINSTALLED
)
548 for (ExecutionModulesListener listener
: executionModulesListeners
)
549 listener
.executionModuleRemoved(osgiBundle
550 .getModuleDescriptor());
555 @SuppressWarnings({ "rawtypes" })
556 public synchronized void bind(Object service
, Map properties
)
558 if (service
instanceof ExecutionFlowDescriptorConverter
) {
559 ExecutionFlowDescriptorConverter executionFlowDescriptorConverter
= (ExecutionFlowDescriptorConverter
) service
;
560 OsgiBundle osgiBundle
= asOsgiBundle(properties
);
561 executionFlowDescriptorConverters
.put(osgiBundle
,
562 executionFlowDescriptorConverter
);
563 if (log
.isTraceEnabled())
564 log
.debug("Registered execution flow descriptor converter from "
571 @SuppressWarnings("rawtypes")
572 public synchronized void unbind(Object service
, Map properties
)
574 if (service
instanceof ExecutionFlowDescriptorConverter
) {
575 OsgiBundle osgiBundle
= asOsgiBundle(properties
);
576 if (executionFlowDescriptorConverters
.containsKey(osgiBundle
)) {
577 executionFlowDescriptorConverters
.remove(osgiBundle
);
578 if (log
.isTraceEnabled())
579 log
.debug("Removed execution flow descriptor converter from "
590 protected MBeanServer
getMBeanServer() {
591 return ManagementFactory
.getPlatformMBeanServer();
594 public void registerMBean(Module module
, ExecutionFlow executionFlow
) {
596 StandardMBean mbean
= new StandardMBean(executionFlow
,
597 ExecutionFlow
.class);
598 getMBeanServer().registerMBean(mbean
,
599 flowMBeanName(module
, executionFlow
));
600 } catch (Exception e
) {
601 String msg
= "Cannot register execution flow " + executionFlow
603 throw new SlcException(msg
, e
);
607 public void unregisterMBean(Module module
, ExecutionFlow executionFlow
) {
609 getMBeanServer().unregisterMBean(
610 flowMBeanName(module
, executionFlow
));
611 } catch (Exception e
) {
612 String msg
= "Cannot unregister execution flow " + executionFlow
614 throw new SlcException(msg
, e
);
618 protected ObjectName
flowMBeanName(Module module
,
619 ExecutionFlow executionFlow
) {
620 String executionModulesPrefix
= "SLCExecutionModules";
621 // String path = executionFlow.getPath();
622 String name
= executionFlow
.getName();
623 // if (path == null && name.indexOf('/') >= 0) {
624 // path = name.substring(0, name.lastIndexOf('/'));
625 // name = name.substring(name.lastIndexOf('/'));
628 StringBuffer buf
= new StringBuffer(executionModulesPrefix
+ ":"
629 + "module=" + module
.getName() + " [" + module
.getVersion()
632 // if (path != null && !path.equals("")) {
634 // for (String token : path.split("/")) {
635 // if (!token.equals("")) {
636 // buf.append("path").append(depth).append('=');
637 // // in order to have directories first
639 // buf.append(token).append(',');
644 buf
.append("name=").append(name
);
646 return new ObjectName(buf
.toString());
647 } catch (Exception e
) {
648 throw new SlcException("Cannot generate object name based on "
656 @SuppressWarnings("rawtypes")
657 private OsgiBundle
asOsgiBundle(Map properties
) {
658 String bundleSymbolicName
= checkAndGet(Constants
.BUNDLE_SYMBOLICNAME
,
660 String bundleVersion
= checkAndGet(Constants
.BUNDLE_VERSION
, properties
);
661 return new OsgiBundle(bundleSymbolicName
, bundleVersion
);
664 @SuppressWarnings("rawtypes")
665 private String
checkAndGet(Object key
, Map properties
) {
666 if (!properties
.containsKey(key
) || properties
.get(key
) == null)
667 throw new SlcException(key
+ " not set in " + properties
);
669 return properties
.get(key
).toString();
672 public void setBundlesManager(BundlesManager bundlesManager
) {
673 this.bundlesManager
= bundlesManager
;
676 public void setDefaultDescriptorConverter(
677 ExecutionFlowDescriptorConverter defaultDescriptorConverter
) {
678 this.defaultDescriptorConverter
= defaultDescriptorConverter
;
681 public void setRegisterFlowsToJmx(Boolean registerFlowsToJmx
) {
682 this.registerFlowsToJmx
= registerFlowsToJmx
;