public class DslComponent extends BrooklynDslDeferredSupplier<Entity>
Modifier and Type | Class and Description |
---|---|
static class |
DslComponent.Scope |
ImmediateSupplier.ImmediateUnsupportedException
Constructor and Description |
---|
DslComponent(DslComponent.Scope scope)
Resolve in scope relative to the current
BrooklynTaskTags#getTargetOrContextEntity) target or context entity
(where the scope defines an unambiguous relationship that will resolve to a single
component - e.g. |
DslComponent(DslComponent.Scope scope,
DeferredSupplier<?> componentIdSupplier) |
DslComponent(DslComponent.Scope scope,
java.lang.String componentId)
Resolve componentId in scope relative to the current
BrooklynTaskTags#getTargetOrContextEntity) target or context entity. |
DslComponent(DslComponent scopeComponent,
DslComponent.Scope scope)
Resolve in scope relative to
scopeComponent entity
(where the scope defines an unambiguous relationship that will resolve to a single
component - e.g. |
DslComponent(DslComponent scopeComponent,
DslComponent.Scope scope,
DeferredSupplier<?> componentIdSupplier)
Resolve componentId in scope relative to scopeComponent.
|
DslComponent(DslComponent scopeComponent,
DslComponent.Scope scope,
java.lang.String componentId)
Resolve componentId in scope relative to scopeComponent.
|
DslComponent(java.lang.String componentId)
Deprecated.
since 0.10.0; pass the
DslComponent.Scope explicitly. |
Modifier and Type | Method and Description |
---|---|
DslComponent |
ancestor(java.lang.Object id) |
BrooklynDslDeferredSupplier<?> |
attributeWhenReady(java.lang.String sensorName) |
DslComponent |
child(java.lang.Object id) |
DslComponent |
component(java.lang.Object id)
Deprecated.
|
DslComponent |
component(java.lang.String scope,
java.lang.Object id) |
BrooklynDslDeferredSupplier<?> |
config(java.lang.String keyName) |
DslComponent |
descendant(java.lang.Object id) |
DslComponent |
entity(java.lang.Object id) |
BrooklynDslDeferredSupplier<?> |
entityId() |
boolean |
equals(java.lang.Object obj) |
Maybe<Entity> |
getImmediately()
Gets the value promptly, or returns
Maybe.absent() if the value is not yet available. |
int |
hashCode() |
static DslComponent |
newInstance(DslComponent.Scope scope,
java.lang.Object componentId)
Checks the type of
componentId to create the right kind of DslComponent
(based on whether the componentId is already resolved. |
static DslComponent |
newInstance(DslComponent scopeComponent,
DslComponent.Scope scope,
java.lang.Object componentId)
Checks the type of
componentId to create the right kind of DslComponent
(based on whether the componentId is already resolved. |
Task<Entity> |
newTask() |
DslComponent |
parent() |
DslComponent |
root() |
DslComponent |
scopeRoot() |
DslComponent |
self() |
BrooklynDslDeferredSupplier<Sensor<?>> |
sensor(java.lang.Object sensorIndicator) |
DslComponent |
sibling(java.lang.Object id) |
java.lang.String |
toString() |
get
@Deprecated public DslComponent(java.lang.String componentId)
DslComponent.Scope
explicitly.DslComponent.Scope.GLOBAL
scope.public DslComponent(DslComponent.Scope scope)
BrooklynTaskTags#getTargetOrContextEntity) target or context
entity
(where the scope defines an unambiguous relationship that will resolve to a single
component - e.g. "parent").public DslComponent(DslComponent scopeComponent, DslComponent.Scope scope)
scopeComponent
entity
(where the scope defines an unambiguous relationship that will resolve to a single
component - e.g. "parent").public DslComponent(DslComponent.Scope scope, java.lang.String componentId)
BrooklynTaskTags#getTargetOrContextEntity) target or context
entity.public DslComponent(DslComponent.Scope scope, DeferredSupplier<?> componentIdSupplier)
public DslComponent(DslComponent scopeComponent, DslComponent.Scope scope, java.lang.String componentId)
public DslComponent(DslComponent scopeComponent, DslComponent.Scope scope, DeferredSupplier<?> componentIdSupplier)
public static DslComponent newInstance(DslComponent scopeComponent, DslComponent.Scope scope, java.lang.Object componentId)
componentId
to create the right kind of DslComponent
(based on whether the componentId is already resolved. Accepts either a String
or a
DeferredSupplier
.public static DslComponent newInstance(DslComponent.Scope scope, java.lang.Object componentId)
componentId
to create the right kind of DslComponent
(based on whether the componentId is already resolved. Accepts either a String
or a
DeferredSupplier
.public final Maybe<Entity> getImmediately()
ImmediateSupplier
Maybe.absent()
if the value is not yet available.public Task<Entity> newTask()
newTask
in interface TaskFactory<Task<Entity>>
newTask
in class BrooklynDslDeferredSupplier<Entity>
public DslComponent entity(java.lang.Object id)
public DslComponent child(java.lang.Object id)
public DslComponent sibling(java.lang.Object id)
public DslComponent descendant(java.lang.Object id)
public DslComponent ancestor(java.lang.Object id)
public DslComponent root()
public DslComponent scopeRoot()
@Deprecated public DslComponent component(java.lang.Object id)
public DslComponent self()
public DslComponent parent()
public DslComponent component(java.lang.String scope, java.lang.Object id)
public BrooklynDslDeferredSupplier<?> entityId()
public BrooklynDslDeferredSupplier<?> attributeWhenReady(java.lang.String sensorName)
public BrooklynDslDeferredSupplier<?> config(java.lang.String keyName)
public BrooklynDslDeferredSupplier<Sensor<?>> sensor(java.lang.Object sensorIndicator)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object