public abstract class BrooklynDslDeferredSupplier<T> extends Object implements DeferredSupplier<T>, brooklyn.management.TaskFactory<brooklyn.management.Task<T>>
DeferredSupplier so that they can be resolved when needed
(e.g. when entity-lookup and execution contexts are available).
implementations of this abstract class are expected to be immutable,
as instances must support usage in multiple Assembly instances
created from a single AssemblyTemplate
subclasses which return a deferred value are typically only
resolvable in the context of a Task on an Entity;
these should be only used as the value of a ConfigKey set in the YAML,
and should not accessed until after the components / entities are created
and are being started.
(TODO the precise semantics of this are under development.)
| Constructor and Description |
|---|
BrooklynDslDeferredSupplier() |
| Modifier and Type | Method and Description |
|---|---|
protected EntityInternal |
entity()
returns the current entity; for use in implementations of
get() |
T |
get() |
abstract brooklyn.management.Task<T> |
newTask() |
public final Object dsl
protected final EntityInternal entity()
get()public final T get()
get in interface DeferredSupplier<T>get in interface com.google.common.base.Supplier<T>public abstract brooklyn.management.Task<T> newTask()
newTask in interface brooklyn.management.TaskFactory<brooklyn.management.Task<T>>Copyright © 2014. All Rights Reserved.