|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface LocationRegistry
The registry of the sorts of locations that brooklyn knows about. Given a
or a String representation of a spec, this can
be used to create a Location instance.
| Method Summary | |
|---|---|
boolean |
canMaybeResolve(String spec)
Returns true/false depending whether spec seems like a valid location, that is it has a chance of being resolved (depending on the spec) but NOT guaranteed; see resolveIfPossible(String) which has stronger guarantees |
boolean |
canResolve(String spec)
Deprecated. since 0.6.0, @see resolveIfPossible(String) and
#canMaybeResolve(String) as a "true" here does not mean it can actually resolve it |
LocationDefinition |
getDefinedLocation(String id)
Deprecated. since 0.6.0; use getDefinedLocationById(String)
(ID should be explicit because this is usually *not* the method people want) |
LocationDefinition |
getDefinedLocationById(String id)
returns a LocationDefinition given its ID (usually a random string), or null if none |
LocationDefinition |
getDefinedLocationByName(String name)
returns a LocationDefinition given its name (e.g. |
Map<String,LocationDefinition> |
getDefinedLocations()
map of ID (possibly randomly generated) to the definition (spec, name, id, and props; where spec is the spec as defined, for instance possibly another named:xxx location) |
Map |
getProperties()
|
void |
removeDefinedLocation(String id)
removes the defined location from the registry (applications running there are unaffected) |
List<Location> |
resolve(Iterable<?> spec)
As resolve(String) but works with a collection of location specs. |
Location |
resolve(LocationDefinition l)
returns fully populated (config etc) location from the given definition |
Location |
resolve(String spec)
See resolve(String, Map) (with no options) |
Location |
resolve(String spec,
Map locationFlags)
Returns a location created from the given spec, which might correspond to a definition, or created on-the-fly. |
Location |
resolveIfPossible(String spec)
as resolve(String) but returning null (never throwing) |
void |
updateDefinedLocation(LocationDefinition l)
adds or updates the given defined location |
| Method Detail |
|---|
Map<String,LocationDefinition> getDefinedLocations()
@Deprecated LocationDefinition getDefinedLocation(String id)
getDefinedLocationById(String)
(ID should be explicit because this is usually *not* the method people want)
LocationDefinition getDefinedLocationById(String id)
LocationDefinition getDefinedLocationByName(String name)
void updateDefinedLocation(LocationDefinition l)
void removeDefinedLocation(String id)
Location resolve(LocationDefinition l)
Location resolve(String spec)
resolve(String, Map) (with no options)
boolean canMaybeResolve(String spec)
resolveIfPossible(String) which has stronger guarantees
@Deprecated boolean canResolve(String spec)
resolveIfPossible(String) and
#canMaybeResolve(String) as a "true" here does not mean it can actually resolve it
Location resolve(String spec,
Map locationFlags)
NoSuchElementException - if the spec cannot be resolvedLocation resolveIfPossible(String spec)
resolve(String) but returning null (never throwing)
List<Location> resolve(Iterable<?> spec)
resolve(String) but works with a collection of location specs.
Usually given a collection of string specs. Also supports comma-separated lists as a single spec.
For legacy compatibility this also accepts nested lists, but that is deprecated (and triggers a warning).
Map getProperties()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||