public class MockConfigurationContext extends java.lang.Object implements ConfigurationContext
| Constructor and Description |
|---|
MockConfigurationContext(ControllerService service,
java.util.Map<PropertyDescriptor,java.lang.String> properties,
ControllerServiceLookup serviceLookup,
VariableRegistry variableRegistry) |
MockConfigurationContext(java.util.Map<PropertyDescriptor,java.lang.String> properties,
ControllerServiceLookup serviceLookup) |
MockConfigurationContext(java.util.Map<PropertyDescriptor,java.lang.String> properties,
ControllerServiceLookup serviceLookup,
VariableRegistry variableRegistry) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.String> |
getAllProperties() |
java.util.Map<PropertyDescriptor,java.lang.String> |
getProperties() |
PropertyValue |
getProperty(PropertyDescriptor property)
Retrieves the current value set for the given descriptor, if a value is
set - else uses the descriptor to determine the appropriate default value
|
java.lang.String |
getSchedulingPeriod() |
java.lang.Long |
getSchedulingPeriod(java.util.concurrent.TimeUnit timeUnit)
Returns the amount of time, in the given
TimeUnit that will
elapsed between the return of one execution of the
component's onTrigger method and
the time at which the method is invoked again. |
public MockConfigurationContext(java.util.Map<PropertyDescriptor,java.lang.String> properties, ControllerServiceLookup serviceLookup)
public MockConfigurationContext(java.util.Map<PropertyDescriptor,java.lang.String> properties, ControllerServiceLookup serviceLookup, VariableRegistry variableRegistry)
public MockConfigurationContext(ControllerService service, java.util.Map<PropertyDescriptor,java.lang.String> properties, ControllerServiceLookup serviceLookup, VariableRegistry variableRegistry)
public PropertyValue getProperty(PropertyDescriptor property)
PropertyContextgetProperty in interface PropertyContextproperty - to lookup the value ofpublic java.util.Map<PropertyDescriptor,java.lang.String> getProperties()
getProperties in interface ConfigurationContextControllerServicepublic java.util.Map<java.lang.String,java.lang.String> getAllProperties()
getAllProperties in interface PropertyContextpublic java.lang.String getSchedulingPeriod()
getSchedulingPeriod in interface ConfigurationContextnull if
the component does not have a scheduling period (e.g., for ControllerServices)public java.lang.Long getSchedulingPeriod(java.util.concurrent.TimeUnit timeUnit)
ConfigurationContextTimeUnit that will
elapsed between the return of one execution of the
component's onTrigger method and
the time at which the method is invoked again. This method will return
null if the component does not have a scheduling period (e.g., for ControllerServices)getSchedulingPeriod in interface ConfigurationContexttimeUnit - unit of time for schedulingnull if component does not have a scheduling
period