Brooklyn

brooklyn.entity.basic
[Java] Class EffectorUtils

java.lang.Object
  brooklyn.entity.basic.EffectorUtils

public class EffectorUtils

The abstract Effector implementation. The concrete subclass (often anonymous) will supply the call(EntityType, Map) implementation, and the fields in the constructor.


Method Summary
static Effector findEffectorMatching(java.util.Set effectors, java.lang.String effectorName, java.util.Map parameters)

static java.lang.Object[] prepareArgsForEffector(Effector eff, java.lang.Object args)

Takes arguments, and returns an array of arguments suitable for use by the Effector according to the ParameterTypes it exposes.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

findEffectorMatching

public static Effector findEffectorMatching(java.util.Set effectors, java.lang.String effectorName, java.util.Map parameters)


prepareArgsForEffector

public static java.lang.Object[] prepareArgsForEffector(Effector eff, java.lang.Object args)
Takes arguments, and returns an array of arguments suitable for use by the Effector according to the ParameterTypes it exposes. The args can be: 1. an array of ordered arguments 2. a collection (which will be automatically converted to an array) 3. a single argument (which will then be wrapped in an array) 4. a map containing the (named) arguments 5. an array or collection single entry of a map (treated same as 5 above) 6. a semi-populated array or collection that also containing a map as first arg - uses ordered args in array, but uses named values from map in preference. 7. semi-populated array or collection, where default values will otherwise be used.


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.