public interface Location extends java.io.Serializable, BrooklynObject
Startable.start(Collection)
.
Locations may not be Serializable
in subsequent releases!BrooklynObject.TagSupport
Modifier and Type | Method and Description |
---|---|
boolean |
containsLocation(Location potentialDescendent)
Answers true if this location equals or is an ancestor of the given location.
|
java.util.Map<java.lang.String,java.lang.Object> |
getAllConfig(boolean includeInherited)
Returns all config set, either inherited (argument true) or locally-only (argument false)
|
java.util.Collection<Location> |
getChildren()
Get the 'children' of this location.
|
<T> T |
getConfig(ConfigKey.HasConfigKey<T> key) |
<T> T |
getConfig(ConfigKey<T> key)
Returns configuration set at this location or inherited or default
|
java.lang.String |
getDisplayName()
Get the name assigned to this location.
|
<T> T |
getExtension(java.lang.Class<T> extensionType)
Returns an extension of the given type.
|
java.lang.String |
getId()
A unique id for this location.
|
Location |
getParent()
Get the 'parent' of this location.
|
boolean |
hasConfig(ConfigKey<?> key,
boolean includeInherited)
True iff the indication config key is set, either inherited (second argument true) or locally-only (second argument false)
|
boolean |
hasExtension(java.lang.Class<?> extensionType)
Whether this location has support for the given extension type.
|
void |
setParent(Location newParent)
Set the 'parent' of this location.
|
java.lang.String |
toVerboseString() |
getCatalogItemId, getTagSupport, tags
java.lang.String getId()
getId
in interface Identifiable
java.lang.String getDisplayName()
getDisplayName
in interface BrooklynObject
Location getParent()
null
if this location is the tree root.null
if this location is the tree root.java.util.Collection<Location> getChildren()
void setParent(Location newParent)
null
to indicate that the location should be disconnected
from its parent.
Adds this location as a child of the new parent (see getChildLocations()
).newParent
- the new parent location object, or null
to clear the parent reference.java.lang.String toVerboseString()
boolean containsLocation(Location potentialDescendent)
<T> T getConfig(ConfigKey<T> key)
<T> T getConfig(ConfigKey.HasConfigKey<T> key)
boolean hasConfig(ConfigKey<?> key, boolean includeInherited)
java.util.Map<java.lang.String,java.lang.Object> getAllConfig(boolean includeInherited)
boolean hasExtension(java.lang.Class<?> extensionType)
getExtension(Class)
.java.lang.NullPointerException
- if extensionType is null<T> T getExtension(java.lang.Class<T> extensionType)
getExtension(Object.class)
will not match
anything, even though registered extension extend Object
.
This will not look at extensions of getParent()
.
java.lang.IllegalArgumentException
- if this location does not support the given extension typejava.lang.NullPointerException
- if extensionType is null