|
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.
Nested Class Summary | |
---|---|
static class |
LocalhostMachineProvisioningLocation.LocalhostMachine
|
Field Summary | |
---|---|
static Logger |
LOG
|
Fields inherited from class FixedListMachineProvisioningLocation | |
---|---|
inUse, machines, pendingRemoval |
Fields inherited from class AbstractLocation | |
---|---|
LOG, PARENT_LOCATION, hostGeoInfo, name |
Constructor Summary | |
LocalhostMachineProvisioningLocation()
Construct a new instance. |
|
LocalhostMachineProvisioningLocation(java.util.Map properties)
@param properties the properties of the new instance. |
|
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 Networking#isPortAvailable(int)#isPortAvailable(int) |
void
|
configure(java.util.Map flags)
|
java.net.InetAddress
|
getAddress()
|
static java.net.InetAddress
|
getLocalhostInetAddress()
|
static boolean
|
isSudoAllowed()
|
static int
|
obtainPort(PortRange range)
|
static int
|
obtainPort(java.net.InetAddress localAddress, PortRange range)
|
static boolean
|
obtainSpecificPort(java.net.InetAddress localAddress, int portNumber)
|
protected void
|
provisionMore(int size, java.util.Map flags)
|
void
|
release(SshMachineLocation machine)
|
static void
|
releasePort(java.net.InetAddress localAddress, int portNumber)
|
static LocationSpec
|
spec()
|
Methods inherited from class FixedListMachineProvisioningLocation | |
---|---|
addChild, addMachine, canProvisionMore, close, configure, getAllMachines, getAvailable, getInUse, getMachines, getProvisioningFlags, init, newSubLocation, obtain, obtain, provisionMore, provisionMore, release, removeChild, removeMachine, toVerboseString |
Field Detail |
---|
public static final Logger LOG
Constructor Detail |
---|
public LocalhostMachineProvisioningLocation()
public LocalhostMachineProvisioningLocation(java.util.Map properties)
properties
- the properties of the new instance.
public LocalhostMachineProvisioningLocation(java.lang.String name)
public LocalhostMachineProvisioningLocation(java.lang.String name, int count)
Method Detail |
---|
return canProvisionMore; public boolean canProvisionMore()
public static boolean checkPortAvailable(java.net.InetAddress localAddress, int portNumber)
public void configure(java.util.Map flags)
return address; public java.net.InetAddress getAddress()
public static java.net.InetAddress getLocalhostInetAddress()
public static boolean isSudoAllowed()
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)
for (int i=0; iprovisionMore(int size, java.util.Map flags)
public void release(SshMachineLocation machine)
public static void releasePort(java.net.InetAddress localAddress, int portNumber)
public static LocationSpec spec()
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.