brooklyn.location
Interface LocationResolver


public interface LocationResolver

Provides a way of creating location instances of a particular type.


Method Summary
 boolean accepts(String spec, LocationRegistry registry)
          whether the spec is something which should be passed to this resolver
 String getPrefix()
          the prefix that this resolver will attend to
 void init(ManagementContext managementContext)
           
 Location newLocationFromString(Map properties, String spec)
          Deprecated. since 0.6; use newLocationFromString(Map, String, LocationRegistry)
 Location newLocationFromString(Map locationFlags, String spec, LocationRegistry registry)
          Similar to newLocationFromString(Map, String) but passing in a reference to the registry itself (from which the base properties are discovered) and including flags (e.g.
 

Method Detail

init

void init(ManagementContext managementContext)

getPrefix

String getPrefix()
the prefix that this resolver will attend to


accepts

boolean accepts(String spec,
                LocationRegistry registry)
whether the spec is something which should be passed to this resolver


newLocationFromString

@Deprecated
Location newLocationFromString(Map properties,
                                          String spec)
Deprecated. since 0.6; use newLocationFromString(Map, String, LocationRegistry)

Returns a Location instance, e.g. a JcloudsLocation instance configured to provision in AWS eu-west-1; the properties map may contain lots of info some of which may be relevant to this location (eg containing credentials for many clouds, and resolver picks out the ones applicable here) -- commonly it is a BrooklynProperties instance, read from .brooklyn/brooklyn.properties

Throws:
NoSuchElementException - if not found

newLocationFromString

Location newLocationFromString(Map locationFlags,
                               String spec,
                               LocationRegistry registry)
Similar to newLocationFromString(Map, String) but passing in a reference to the registry itself (from which the base properties are discovered) and including flags (e.g. user, key, cloud credential) which are known to be for this location.

introduced to support locations which refer to other locations, e.g. NamedLocationResolver



Copyright © 2013. All Rights Reserved.