public class SimulatedLocation extends AbstractLocation implements MachineProvisioningLocation<MachineLocation>, MachineLocation, PortSupplier
BrooklynObject.TagSupport
Configurable.ConfigurationSupport
BrooklynObjectInternal.ConfigurationSupportInternal
LOG, PARENT_LOCATION, TEMPORARY_LOCATION
FINAL_SPEC, NAMED_SPEC_NAME, ORIGINAL_SPEC
Constructor and Description |
---|
SimulatedLocation()
Deprecated.
|
SimulatedLocation(java.util.Map<java.lang.String,? extends java.lang.Object> flags)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
java.net.InetAddress |
getAddress()
Deprecated.
Return the single most appropriate address for this location.
|
java.lang.String |
getHostname()
Deprecated.
note
|
MachineDetails |
getMachineDetails()
Deprecated.
|
OsDetails |
getOsDetails()
Deprecated.
|
java.util.Set<java.lang.String> |
getPrivateAddresses()
Deprecated.
All private IP addresses.
|
java.util.Map<java.lang.String,java.lang.Object> |
getProvisioningFlags(java.util.Collection<java.lang.String> tags)
Deprecated.
Gets flags, suitable as an argument to
MachineProvisioningLocation.obtain(Map) . |
java.util.Set<java.lang.String> |
getPublicAddresses()
Deprecated.
All public IP addresses, potentially including shared ips.
|
SimulatedLocation |
newSubLocation(java.util.Map<?,?> newFlags)
Deprecated.
Creates a new location of the same type, but with additional creation instructions in the form of flags,
e.g.
|
MachineLocation |
obtain(java.util.Map<?,?> flags)
Deprecated.
Obtain a machine in this location.
|
int |
obtainPort(PortRange range)
Deprecated.
Reserve a port for your application, with a port number in a specific range.
|
boolean |
obtainSpecificPort(int portNumber)
Deprecated.
Reserve a specific port for an application.
|
void |
release(MachineLocation machine)
Deprecated.
Release a previously-obtained machine.
|
void |
releasePort(int portNumber)
Deprecated.
Release a previously reserved port.
|
void |
setPermittedPorts(java.lang.Iterable<java.lang.Integer> ports)
Deprecated.
|
addChild, addExtension, config, configure, containsLocation, equals, getAllConfig, getAllConfigBag, getChildren, getConfig, getConfig, getDisplayName, getExtension, getHostGeoInfo, getLocalConfigBag, getParent, getRawLocalConfigBag, getRebindSupport, hasConfig, hasExtension, hashCode, isManaged, onManagementStarted, onManagementStopped, removeChild, setConfig, setDisplayName, setHostGeoInfo, setManagementContext, setName, setParent, setParent, toMetadataRecord, toString, toVerboseString
getCatalogItemId, getId, getManagementContext, getTagSupport, init, rebind, setCatalogItemId, tags
containsLocation, getAllConfig, getChildren, getConfig, getConfig, getDisplayName, getExtension, getId, getParent, hasConfig, hasExtension, setParent, toVerboseString
getCatalogItemId, getTagSupport, tags
config, setConfig
getManagementContext
setCatalogItemId
public SimulatedLocation()
public SimulatedLocation(java.util.Map<java.lang.String,? extends java.lang.Object> flags)
public SimulatedLocation newSubLocation(java.util.Map<?,?> newFlags)
MachineProvisioningLocation
Implementers who wish to subclass this provisioning location for additional functionality in a specific cloud can use the relevant implementation of this method as a guide.
newSubLocation
in interface MachineProvisioningLocation<MachineLocation>
public MachineLocation obtain(java.util.Map<?,?> flags)
MachineProvisioningLocation
obtain
in interface MachineProvisioningLocation<MachineLocation>
obtain
in interface ProvisioningLocation<MachineLocation>
flags
- Details of the desired machine (e.g. image, size, open ports, etc; some flag support is limited to selected providers).
"callerContext" can be specified to have custom logging and error messages (useful if starting machines in parallel)public void release(MachineLocation machine)
MachineProvisioningLocation
release
in interface MachineProvisioningLocation<MachineLocation>
release
in interface ProvisioningLocation<MachineLocation>
machine
- a MachineLocation
previously obtained from a call to #obtain()
public java.util.Map<java.lang.String,java.lang.Object> getProvisioningFlags(java.util.Collection<java.lang.String> tags)
MachineProvisioningLocation
MachineProvisioningLocation.obtain(Map)
. The tags provided give
hints about the machine required. The provisioning-location could be configured to
understand those tags.
For example, an AWS-location could be configured to understand that a particular entity
type (e.g. "TomcatServer") requires a particular AMI in that region, so would return the
required image id.getProvisioningFlags
in interface MachineProvisioningLocation<MachineLocation>
public java.net.InetAddress getAddress()
AddressableLocation
getAddress
in interface AddressableLocation
getAddress
in interface MachineLocation
public java.lang.String getHostname()
HasNetworkAddresses
getHostname
in interface HasNetworkAddresses
public java.util.Set<java.lang.String> getPublicAddresses()
HasNetworkAddresses
getPublicAddresses
in interface HasNetworkAddresses
public java.util.Set<java.lang.String> getPrivateAddresses()
HasNetworkAddresses
getPrivateAddresses
in interface HasNetworkAddresses
public boolean obtainSpecificPort(int portNumber)
PortSupplier
obtainSpecificPort
in interface PortSupplier
portNumber
- the required port number.true
if the port was successfully reserved; false
if it has been previously reserved.public int obtainPort(PortRange range)
PortSupplier
obtainPort
in interface PortSupplier
range
- the range of acceptable port numbers.public void releasePort(int portNumber)
PortSupplier
releasePort
in interface PortSupplier
portNumber
- the port number from a call to PortSupplier.obtainPort(PortRange)
or PortSupplier.obtainSpecificPort(int)
public void setPermittedPorts(java.lang.Iterable<java.lang.Integer> ports)
public OsDetails getOsDetails()
getOsDetails
in interface MachineLocation
public MachineDetails getMachineDetails()
getMachineDetails
in interface MachineLocation