|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.location.basic.AbstractLocation
brooklyn.location.basic.FixedListMachineProvisioningLocation
brooklyn.location.basic.LocalhostMachineProvisioningLocation
public class LocalhostMachineProvisioningLocation extends FixedListMachineProvisioningLocation
An implementation of MachineProvisioningLocation that can provision a SshMachineLocation for the local host. By default you can only obtain a single SshMachineLocation for the localhost. Optionally, you can "overload" and choose to allow localhost to be provisioned multiple times, which may be useful in some testing scenarios.
Field Summary | |
---|---|
static Logger |
LOG
|
Fields inherited from class FixedListMachineProvisioningLocation | |
---|---|
inUse, machines |
Fields inherited from class AbstractLocation | |
---|---|
LOG, hostGeoInfo, leftoverProperties, name |
Constructor Summary | |
LocalhostMachineProvisioningLocation()
Construct a new instance. |
|
LocalhostMachineProvisioningLocation(java.util.Map properties)
|
|
LocalhostMachineProvisioningLocation(java.lang.String name)
|
|
LocalhostMachineProvisioningLocation(java.lang.String name, int count)
|
Method Summary | |
---|---|
boolean
|
canProvisionMore()
|
static boolean
|
checkPortAvailable(java.net.InetAddress localAddress, int portNumber)
checks the actual availability of the port on localhost, ie by binding to it; cf NetworkUtils#isPortAvailable(int)#isPortAvailable(int) |
protected void
|
configure()
|
protected void
|
configure(java.util.Map flags)
|
java.net.InetAddress
|
getAddress()
|
static java.net.InetAddress
|
getLocalhostInetAddress()
|
static int
|
obtainPort(PortRange range)
|
static int
|
obtainPort(java.net.InetAddress localAddress, PortRange range)
|
static boolean
|
obtainSpecificPort(java.net.InetAddress localAddress, int portNumber)
|
void
|
provisionMore(int size)
|
void
|
release(SshMachineLocation machine)
|
static void
|
releasePort(java.net.InetAddress localAddress, int portNumber)
|
Methods inherited from class FixedListMachineProvisioningLocation | |
---|---|
addChildLocation, canProvisionMore, configure, getAvailable, getInUse, getLatitude, getLongitude, getMachines, getProvisioningFlags, obtain, obtain, provisionMore, release, removeChildLocation |
Methods inherited from class AbstractLocation | |
---|---|
addChildLocation, configure, configure, containsLocation, equals, findLocationProperty, getChildLocations, getHostGeoInfo, getId, getLocationProperty, getName, getParentLocation, hasLocationProperty, hashCode, removeChildLocation, setHostGeoInfo, setParentLocation, string, toString |
Field Detail |
---|
public static final Logger LOG
Constructor Detail |
---|
public LocalhostMachineProvisioningLocation()
properties
- the properties of the new instance.
public LocalhostMachineProvisioningLocation(java.util.Map properties)
public LocalhostMachineProvisioningLocation(java.lang.String name)
public LocalhostMachineProvisioningLocation(java.lang.String name, int count)
Method Detail |
---|
public boolean canProvisionMore()
public static boolean checkPortAvailable(java.net.InetAddress localAddress, int portNumber)
protected void configure()
protected void configure(java.util.Map flags)
public java.net.InetAddress getAddress()
public static java.net.InetAddress getLocalhostInetAddress()
public static int obtainPort(PortRange range)
public static int obtainPort(java.net.InetAddress localAddress, PortRange range)
public static boolean obtainSpecificPort(java.net.InetAddress localAddress, int portNumber)
@SuppressWarnings({ "unchecked", "rawtypes" }) public void provisionMore(int size)
public void release(SshMachineLocation machine)
public static void releasePort(java.net.InetAddress localAddress, int portNumber)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.