|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectbrooklyn.location.LocationSpec<T>
T - The type of location to be createdpublic class LocationSpec<T extends Location>
Gives details of a location to be created. It describes the location's configuration, and is
reusable to create multiple locations with the same configuration.
To create a LocationSpec, it is strongly encouraged to use create(...) methods.
| Constructor Summary | |
|---|---|
protected |
LocationSpec(Class<T> type)
|
| Method Summary | ||
|---|---|---|
LocationSpec<T> |
configure(CharSequence key,
Object val)
|
|
|
configure(brooklyn.config.ConfigKey.HasConfigKey<V> key,
Task<? extends V> val)
|
|
|
configure(brooklyn.config.ConfigKey.HasConfigKey<V> key,
V val)
|
|
|
configure(brooklyn.config.ConfigKey<V> key,
Task<? extends V> val)
|
|
|
configure(brooklyn.config.ConfigKey<V> key,
V val)
|
|
LocationSpec<T> |
configure(Map<?,?> val)
|
|
|
configureIfNotNull(brooklyn.config.ConfigKey<V> key,
V val)
|
|
static
|
create(Class<T> type)
Creates a new LocationSpec instance for a location of the given type. |
|
static
|
create(Map<?,?> config,
Class<T> type)
Creates a new LocationSpec instance with the given config, for a location of the given type. |
|
LocationSpec<T> |
displayName(String val)
|
|
|
extension(Class<E> extensionType,
E extension)
|
|
Map<brooklyn.config.ConfigKey<?>,Object> |
getConfig()
|
|
String |
getDisplayName()
|
|
Map<Class<?>,Object> |
getExtensions()
|
|
Map<String,?> |
getFlags()
|
|
Location |
getParent()
|
|
Class<T> |
getType()
|
|
LocationSpec<T> |
parent(Location val)
|
|
static
|
spec(Class<T> type)
Deprecated. since 0.6 (added 0.6.0-M1); use create(Class) |
|
static
|
spec(Map<?,?> config,
Class<T> type)
Deprecated. since 0.6 (added 0.6.0-M1); use create(Map, Class) |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected LocationSpec(Class<T> type)
| Method Detail |
|---|
@Deprecated public static <T extends Location> LocationSpec<T> spec(Class<T> type)
create(Class)
@Deprecated
public static <T extends Location> LocationSpec<T> spec(Map<?,?> config,
Class<T> type)
create(Map, Class)
public static <T extends Location> LocationSpec<T> create(Class<T> type)
LocationSpec instance for a location of the given type. The returned
LocationSpec can then be customized.
type - A Location class
public static <T extends Location> LocationSpec<T> create(Map<?,?> config,
Class<T> type)
LocationSpec instance with the given config, for a location of the given type.
This is primarily for groovy code; equivalent to LocationSpec.create(type).configure(config).
config - The spec's configuration (see configure(Map)).type - A Location classpublic LocationSpec<T> displayName(String val)
public LocationSpec<T> parent(Location val)
public LocationSpec<T> configure(Map<?,?> val)
public LocationSpec<T> configure(CharSequence key,
Object val)
public <V> LocationSpec<T> configure(brooklyn.config.ConfigKey<V> key,
V val)
public <V> LocationSpec<T> configureIfNotNull(brooklyn.config.ConfigKey<V> key,
V val)
public <V> LocationSpec<T> configure(brooklyn.config.ConfigKey<V> key,
Task<? extends V> val)
public <V> LocationSpec<T> configure(brooklyn.config.ConfigKey.HasConfigKey<V> key,
V val)
public <V> LocationSpec<T> configure(brooklyn.config.ConfigKey.HasConfigKey<V> key,
Task<? extends V> val)
public <E> LocationSpec<T> extension(Class<E> extensionType,
E extension)
public Class<T> getType()
public String getDisplayName()
public Location getParent()
public Map<String,?> getFlags()
declarations on the location typepublic Map<brooklyn.config.ConfigKey<?>,Object> getConfig()
public Map<Class<?>,Object> getExtensions()
public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||