public static class LocalhostMachineProvisioningLocation.LocalhostMachine extends SshMachineLocation implements HasSubnetHostname
AbstractLocation.BasicSubscriptionSupport
BrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupport
Configurable.ConfigurationSupport
BrooklynObjectInternal.ConfigurationSupportInternal, BrooklynObjectInternal.RelationSupportInternal<T extends BrooklynObject>, BrooklynObjectInternal.SubscriptionSupportInternal
Modifier and Type | Field and Description |
---|---|
static ConfigKey<java.lang.Boolean> |
SKIP_ON_BOX_BASE_DIR_RESOLUTION |
ALL_SSH_CONFIG_KEY_NAMES, ALL_SSH_CONFIG_KEYS, ALLOCATE_PTY, CLOSE_CONNECTION, DETECT_MACHINE_DETAILS, LOCAL_TEMP_DIR, LOG_PREFIX, MACHINE_DETAILS, NO_STDERR_LOGGING, NO_STDOUT_LOGGING, PASSWORD, PRIVATE_ADDRESSES, PRIVATE_KEY_DATA, PRIVATE_KEY_FILE, PRIVATE_KEY_PASSPHRASE, REUSABLE_SSH_PROPS, SCP_EXECUTABLE, SCRIPT_DIR, SSH_CACHE_EXPIRY_DURATION, SSH_CONFIG_GIVEN_TO_PROPS, SSH_ENV_MAP, SSH_EXECUTABLE, SSH_HOST, SSH_PORT, SSH_TOOL_CLASS, SSH_TOOL_CLASS_PROPERTIES_PREFIX, STDERR, STDOUT, TCP_PORT_MAPPINGS, UNIQUE_ID
PARENT_LOCATION, TEMPORARY_LOCATION
FINAL_SPEC, NAMED_SPEC_NAME, ORIGINAL_SPEC
Constructor and Description |
---|
LocalhostMachineProvisioningLocation.LocalhostMachine() |
LocalhostMachineProvisioningLocation.LocalhostMachine(java.util.Map properties)
Deprecated.
since 0.6.0 use no-arg constructor (and spec) then configure
|
Modifier and Type | Method and Description |
---|---|
LocalhostMachineProvisioningLocation.LocalhostMachine |
configure(java.util.Map<?,?> properties)
Will set fields from flags, and put the remaining ones into the 'leftovers' map.
|
OsDetails |
getOsDetails() |
java.lang.String |
getSubnetHostname()
returns a hostname for use internally within a subnet / VPC
|
java.lang.String |
getSubnetIp()
returns an IP for use internally within a subnet / VPC
|
int |
obtainPort(PortRange range)
Reserve a port for your application, with a port number in a specific range.
|
boolean |
obtainSpecificPort(int portNumber)
Reserve a specific port for an application.
|
void |
releasePort(int portNumber)
Release a previously reserved port.
|
acquireMutex, close, copyFrom, copyFrom, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, copyTo, execCommands, execCommands, execCommands, execCommands, execScript, execScript, execScript, execScript, findKeyPair, findPassword, getAddress, getHostname, getMachineDetails, getPort, getPrivateAddresses, getPublicAddresses, getSshHostAndPort, getUser, hasMutex, init, installTo, installTo, installTo, installTo, isSshable, releaseMutex, toString, toVerboseString, tryAcquireMutex
addChild, addExtension, config, containsLocation, equals, getAllConfig, getAllConfigBag, getChildren, getConfig, getConfig, getDisplayName, getExtension, getHostGeoInfo, getLocalConfigBag, getParent, getRawLocalConfigBag, getRebindSupport, hasConfig, hasExtension, hashCode, isManaged, onManagementStarted, onManagementStopped, relations, removeChild, setConfig, setDisplayName, setHostGeoInfo, setManagementContext, setName, setParent, setParent, subscriptions, toMetadataRecord
getCatalogItemId, getId, getManagementContext, rebind, setCatalogItemId, tags
containsLocation, getAllConfig, getChildren, getConfig, getDisplayName, getExtension, getId, getParent, hasConfig, hasExtension, relations, setParent
getCatalogItemId, subscriptions, tags
config, getConfig, setConfig
getManagementContext
setCatalogItemId
public static final ConfigKey<java.lang.Boolean> SKIP_ON_BOX_BASE_DIR_RESOLUTION
public LocalhostMachineProvisioningLocation.LocalhostMachine()
public LocalhostMachineProvisioningLocation.LocalhostMachine(java.util.Map properties)
public boolean obtainSpecificPort(int portNumber)
PortSupplier
obtainSpecificPort
in interface PortSupplier
obtainSpecificPort
in class SshMachineLocation
portNumber
- the required port number.true
if the port was successfully reserved; false
if it has been previously reserved.SshMachineLocation.obtainPort(PortRange)
,
PortRanges.ANY_HIGH_PORT
public int obtainPort(PortRange range)
PortSupplier
obtainPort
in interface PortSupplier
obtainPort
in class SshMachineLocation
range
- the range of acceptable port numbers.public void releasePort(int portNumber)
PortSupplier
releasePort
in interface PortSupplier
releasePort
in class SshMachineLocation
portNumber
- the port number from a call to PortSupplier.obtainPort(PortRange)
or PortSupplier.obtainSpecificPort(int)
public OsDetails getOsDetails()
getOsDetails
in interface MachineLocation
getOsDetails
in class SshMachineLocation
public LocalhostMachineProvisioningLocation.LocalhostMachine configure(java.util.Map<?,?> properties)
AbstractBrooklynObject
ConfigBag.getUnusedConfig()
.
To be overridden by AbstractEntity, AbstractLoation, AbstractPolicy, AbstractEnricher, etc.
But should not be overridden by specific entity types. If you do, the entity may break in subsequent releases. Also note that if you require fields to be initialized you must do that in this method. You must *not* rely on field initializers because they may not run until *after* this method (this method is invoked by the constructor in this class, so initializers in subclasses will not have run when this overridden method is invoked.)
configure
in class SshMachineLocation
public java.lang.String getSubnetHostname()
HasSubnetHostname
getSubnetHostname
in interface HasSubnetHostname
public java.lang.String getSubnetIp()
HasSubnetHostname
getSubnetIp
in interface HasSubnetHostname