public static class LocalhostMachineProvisioningLocation.LocalhostMachine extends SshMachineLocation
BrooklynObject.TagSupport
Configurable.ConfigurationSupport
BrooklynObjectInternal.ConfigurationSupportInternal
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, LOG_PREFIX, logSsh, MACHINE_DETAILS, NO_STDERR_LOGGING, NO_STDOUT_LOGGING, PASSWORD, 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, STDERR, STDOUT, 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() |
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, 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, removeChild, setConfig, setDisplayName, setHostGeoInfo, setManagementContext, setName, setParent, setParent, toMetadataRecord
getCatalogItemId, getId, getManagementContext, getTagSupport, init, rebind, setCatalogItemId, tags
containsLocation, getAllConfig, getChildren, getConfig, getConfig, getDisplayName, getExtension, getId, getParent, hasConfig, hasExtension, setParent
getCatalogItemId, getTagSupport, tags
config, 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