public class SimulatedLocation extends AbstractLocation implements MachineProvisioningLocation<MachineLocation>, MachineLocation, PortSupplier
BrooklynObject.TagSupportConfigurable.ConfigurationSupportBrooklynObjectInternal.ConfigurationSupportInternalLOG, PARENT_LOCATION, TEMPORARY_LOCATIONFINAL_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, toVerboseStringgetCatalogItemId, getId, getManagementContext, getTagSupport, init, rebind, setCatalogItemId, tagscontainsLocation, getAllConfig, getChildren, getConfig, getConfig, getDisplayName, getExtension, getId, getParent, hasConfig, hasExtension, setParent, toVerboseStringgetCatalogItemId, getTagSupport, tagsconfig, setConfiggetManagementContextsetCatalogItemIdpublic SimulatedLocation()
public SimulatedLocation(java.util.Map<java.lang.String,? extends java.lang.Object> flags)
public SimulatedLocation newSubLocation(java.util.Map<?,?> newFlags)
MachineProvisioningLocationImplementers 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)
MachineProvisioningLocationobtain 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)
MachineProvisioningLocationrelease 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)
MachineProvisioningLocationMachineProvisioningLocation.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()
AddressableLocationgetAddress in interface AddressableLocationgetAddress in interface MachineLocationpublic java.lang.String getHostname()
HasNetworkAddressesgetHostname in interface HasNetworkAddressespublic java.util.Set<java.lang.String> getPublicAddresses()
HasNetworkAddressesgetPublicAddresses in interface HasNetworkAddressespublic java.util.Set<java.lang.String> getPrivateAddresses()
HasNetworkAddressesgetPrivateAddresses in interface HasNetworkAddressespublic boolean obtainSpecificPort(int portNumber)
PortSupplierobtainSpecificPort in interface PortSupplierportNumber - the required port number.true if the port was successfully reserved; false if it has been previously reserved.public int obtainPort(PortRange range)
PortSupplierobtainPort in interface PortSupplierrange - the range of acceptable port numbers.public void releasePort(int portNumber)
PortSupplierreleasePort in interface PortSupplierportNumber - 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 MachineLocationpublic MachineDetails getMachineDetails()
getMachineDetails in interface MachineLocation