public class Locations
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
Locations.LocationsFilter |
Modifier and Type | Field and Description |
---|---|
static Locations.LocationsFilter |
USE_FIRST_LOCATION |
Constructor and Description |
---|
Locations() |
Modifier and Type | Method and Description |
---|---|
static Location |
coerce(ManagementContext mgmt,
java.lang.Object rawO) |
static java.util.Collection<? extends Location> |
coerceToCollection(ManagementContext mgmt,
java.lang.Object rawO) |
static Maybe<MachineLocation> |
findUniqueMachineLocation(java.lang.Iterable<? extends Location> locations)
|
static Maybe<SshMachineLocation> |
findUniqueSshMachineLocation(java.lang.Iterable<? extends Location> locations)
|
static java.util.Collection<? extends Location> |
getLocationsCheckingAncestors(java.util.Collection<? extends Location> locations,
Entity entity)
if no locations are supplied, returns locations on the entity, or in the ancestors, until it finds a non-empty set,
or ultimately the empty set if no locations are anywhere
|
static boolean |
isManaged(Location loc) |
static void |
manage(Location loc,
ManagementContext managementContext)
Deprecated.
in 0.6.0; use
LocationManager.createLocation(LocationSpec) instead. |
static void |
unmanage(Location loc) |
public static final Locations.LocationsFilter USE_FIRST_LOCATION
public static Maybe<MachineLocation> findUniqueMachineLocation(java.lang.Iterable<? extends Location> locations)
public static Maybe<SshMachineLocation> findUniqueSshMachineLocation(java.lang.Iterable<? extends Location> locations)
public static java.util.Collection<? extends Location> getLocationsCheckingAncestors(java.util.Collection<? extends Location> locations, Entity entity)
public static boolean isManaged(Location loc)
public static void unmanage(Location loc)
public static void manage(Location loc, ManagementContext managementContext)
LocationManager.createLocation(LocationSpec)
instead.java.lang.IllegalStateException
- if the parent location is not already managedEntities
).public static Location coerce(ManagementContext mgmt, java.lang.Object rawO)
public static java.util.Collection<? extends Location> coerceToCollection(ManagementContext mgmt, java.lang.Object rawO)