|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.location.basic.AbstractLocation
public abstract class AbstractLocation
A basic implementation of the Location interface. This provides an implementation which works according to the requirements of the interface documentation, and is ready to be extended to make more specialized locations. Override configure(Map) to add special initialization logic.
Field Summary | |
---|---|
static Logger |
LOG
|
protected HostGeoInfo |
hostGeoInfo
|
protected java.util.Map |
leftoverProperties
|
protected java.lang.String |
name
|
Constructor Summary | |
AbstractLocation()
Construct a new instance of an AbstractLocation. |
|
AbstractLocation(java.util.Map properties)
|
Method Summary | |
---|---|
protected void
|
addChildLocation(Location child)
|
protected void
|
configure()
will set fields from flags, and put the remaining ones into the 'leftovers' map. |
protected void
|
configure(java.util.Map properties)
|
boolean
|
containsLocation(Location potentialDescendent)
|
boolean
|
equals(java.lang.Object o)
|
java.lang.Object
|
findLocationProperty(java.lang.String key)
|
java.util.Collection
|
getChildLocations()
|
HostGeoInfo
|
getHostGeoInfo()
|
java.lang.String
|
getId()
|
java.lang.Object
|
getLocationProperty(java.lang.String key)
|
java.lang.String
|
getName()
|
Location
|
getParentLocation()
|
boolean
|
hasLocationProperty(java.lang.String key)
|
int
|
hashCode()
|
protected boolean
|
removeChildLocation(Location child)
|
void
|
setHostGeoInfo(HostGeoInfo hostGeoInfo)
|
void
|
setParentLocation(Location parent)
|
protected ToStringHelper
|
string()
override this, adding to the returned value, to supply additional fields to include in the toString |
java.lang.String
|
toString()
Default String representation is simplified name of class, together with selected fields. |
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() |
Field Detail |
---|
public static final Logger LOG
protected HostGeoInfo hostGeoInfo
protected java.util.Map leftoverProperties
@SetFromFlag protected java.lang.String name
Constructor Detail |
---|
public AbstractLocation()
public AbstractLocation(java.util.Map properties)
Method Detail |
---|
protected void addChildLocation(Location child)
protected void configure()
if you require fields to be initialized you must do that in this method, with a guard (as in FixedListMachineProvisioningLocation). you must *not* rely on field initializers because they may not run until *after* this method (this method is invoked by the constructor in this class, so initializers in subclasses will not have run when this overridden method is invoked.)
protected void configure(java.util.Map properties)
public boolean containsLocation(Location potentialDescendent)
public boolean equals(java.lang.Object o)
public java.lang.Object findLocationProperty(java.lang.String key)
public java.util.Collection getChildLocations()
public HostGeoInfo getHostGeoInfo()
public java.lang.String getId()
public java.lang.Object getLocationProperty(java.lang.String key)
public java.lang.String getName()
public Location getParentLocation()
public boolean hasLocationProperty(java.lang.String key)
public int hashCode()
protected boolean removeChildLocation(Location child)
public void setHostGeoInfo(HostGeoInfo hostGeoInfo)
public void setParentLocation(Location parent)
protected ToStringHelper string()
@Override public java.lang.String toString()
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.