brooklyn.location
Interface LocationRegistry


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 canResolve(String spec)
          Returns true/false depending whether spec seems like a valid location
 LocationDefinition getDefinedLocation(String id)
           
 LocationDefinition getDefinedLocationByName(String name)
           
 Map<String,LocationDefinition> getDefinedLocations()
           
 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.
 void updateDefinedLocation(LocationDefinition l)
          adds or updates the given defined location
 

Method Detail

getDefinedLocations

Map<String,LocationDefinition> getDefinedLocations()

getDefinedLocation

LocationDefinition getDefinedLocation(String id)

getDefinedLocationByName

LocationDefinition getDefinedLocationByName(String name)

updateDefinedLocation

void updateDefinedLocation(LocationDefinition l)
adds or updates the given defined location


removeDefinedLocation

void removeDefinedLocation(String id)
removes the defined location from the registry (applications running there are unaffected)


resolve

Location resolve(LocationDefinition l)
returns fully populated (config etc) location from the given definition


resolve

Location resolve(String spec)
See resolve(String, Map) (with no options)


canResolve

boolean canResolve(String spec)
Returns true/false depending whether spec seems like a valid location


resolve

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. Optional flags can be passed through to underlying the location.


resolve

List<Location> resolve(Iterable<?> spec)
As 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).


getProperties

Map getProperties()


Copyright © 2013. All Rights Reserved.