public class BrooklynLauncher
extends java.lang.Object
{@code BrooklynLauncher launcher = BrooklynLauncher.newInstance() .application(new WebClusterDatabaseExample().appDisplayName("Web-cluster example")) .location("localhost") .start(); Entities.dumpInfo(launcher.getApplications());
Constructor and Description |
---|
BrooklynLauncher() |
Modifier and Type | Method and Description |
---|---|
BrooklynLauncher |
application(Application app)
Specifies that the launcher should manage the given Brooklyn application.
|
BrooklynLauncher |
application(ApplicationBuilder appBuilder)
Specifies that the launcher should build and manage the given Brooklyn application.
|
BrooklynLauncher |
application(EntitySpec<? extends StartableApplication> appSpec)
Specifies that the launcher should build and manage the Brooklyn application
described by the given spec.
|
BrooklynLauncher |
application(java.lang.String yaml)
Specifies that the launcher should build and manage the Brooklyn application
described by the given YAML blueprint.
|
BrooklynLauncher |
bindAddress(java.net.InetAddress bindAddress)
Specifies the NIC where the web console (and any additional webapps specified) will be bound;
default 0.0.0.0, unless no security is specified (e.g.
|
BrooklynLauncher |
brooklynProperties(BrooklynProperties brooklynProperties)
Specifies the brooklyn properties to be used.
|
<T> BrooklynLauncher |
brooklynProperties(ConfigKey<T> key,
T value) |
BrooklynLauncher |
brooklynProperties(java.lang.String field,
java.lang.Object value)
Specifies a property to be added to the brooklyn properties
|
BrooklynLauncher |
catalogInitialization(CatalogInitialization catInit) |
void |
copyPersistedState(java.lang.String destinationDir) |
void |
copyPersistedState(java.lang.String destinationDir,
java.lang.String destinationLocation) |
void |
copyPersistedState(java.lang.String destinationDir,
java.lang.String destinationLocationSpec,
CompoundTransformer transformer) |
BrooklynLauncher |
customizeManagement(com.google.common.base.Function<ManagementContext,java.lang.Void> customizeManagement) |
java.util.List<Application> |
getApplications() |
BrooklynServerDetails |
getServerDetails() |
BrooklynLauncher |
globalBrooklynPropertiesFile(java.lang.String file) |
BrooklynLauncher |
haHeartbeatPeriod(Duration val)
Controls both the frequency of heartbeats, and the frequency of checking the health of other nodes.
|
BrooklynLauncher |
haHeartbeatTimeout(Duration val) |
BrooklynLauncher |
highAvailabilityMode(HighAvailabilityMode highAvailabilityMode) |
BrooklynLauncher |
ignoreAppErrors(boolean ignoreAppErrors) |
BrooklynLauncher |
ignoreCatalogErrors(boolean ignoreCatalogErrors) |
BrooklynLauncher |
ignorePersistenceErrors(boolean ignorePersistenceErrors) |
BrooklynLauncher |
ignoreWebErrors(boolean ignoreWebErrors) |
BrooklynLauncher |
installSecurityFilter(java.lang.Boolean val) |
boolean |
isStarted() |
BrooklynLauncher |
localBrooklynPropertiesFile(java.lang.String file) |
BrooklynLauncher |
location(Location location)
Adds a location to be passed in on
start() , when that calls
application.start(locations) . |
BrooklynLauncher |
location(java.lang.String spec)
Give the spec of an application, to be created.
|
BrooklynLauncher |
locations(java.util.List<java.lang.String> specs) |
BrooklynLauncher |
managementContext(ManagementContext context)
Specifies the management context this launcher should use.
|
static BrooklynLauncher |
newInstance()
Creates a configurable (fluent API) launcher for use starting the web console and Brooklyn applications.
|
BrooklynLauncher |
persistenceDir(java.io.File persistenceDir) |
BrooklynLauncher |
persistenceDir(java.lang.String persistenceDir) |
BrooklynLauncher |
persistenceLocation(java.lang.String persistenceLocationSpec) |
BrooklynLauncher |
persistMode(PersistMode persistMode) |
BrooklynLauncher |
persistPeriod(Duration persistPeriod) |
void |
persistState(BrooklynMementoRawData memento,
java.lang.String destinationDir,
java.lang.String destinationLocationSpec)
Deprecated.
since 0.7.0 use
copyPersistedState(java.lang.String) instead |
BrooklynLauncher |
publicAddress(java.net.InetAddress publicAddress)
Specifies the address that the management context's REST API will be available on.
|
BrooklynMementoRawData |
retrieveState()
Deprecated.
since 0.7.0 use
copyPersistedState(java.lang.String) instead |
BrooklynLauncher |
shutdownOnExit(boolean val) |
BrooklynLauncher |
start()
Starts the web server (with web console) and Brooklyn applications, as per the specifications configured.
|
BrooklynLauncher |
startBrooklynNode(boolean val) |
BrooklynLauncher |
stopWhichAppsOnShutdown(StopWhichAppsOnShutdown stopWhich) |
void |
terminate()
Terminates this launch, but does not stop the applications (i.e.
|
BrooklynLauncher |
webapp(java.lang.String contextPath,
java.lang.String warUrl)
Specifies an additional webapp to host on the webconsole port.
|
BrooklynLauncher |
webconsole(boolean startWebApps)
Specifies whether the launcher will start the Brooklyn web console
(and any additional webapps specified); default true.
|
BrooklynLauncher |
webconsoleHttps(java.lang.Boolean useHttps)
Specifies whether the webconsole should use https.
|
BrooklynLauncher |
webconsolePort(int port)
As
webconsolePort(PortRange) taking a single port |
BrooklynLauncher |
webconsolePort(PortRange port)
Specifies the port where the web console (and any additional webapps specified) will listen;
default (null) means "8081+" being the first available >= 8081 (or "8443+" for https).
|
BrooklynLauncher |
webconsolePort(java.lang.String port)
As
webconsolePort(PortRange) taking a string range |
BrooklynLauncher |
webServerFlags(java.util.Map<java.lang.String,?> webServerFlags)
Specifies additional flags to be passed to
BrooklynWebServer . |
public static BrooklynLauncher newInstance()
public java.util.List<Application> getApplications()
public BrooklynServerDetails getServerDetails()
public BrooklynLauncher application(Application app)
start()
or getApplications()
.application(ApplicationBuilder)
public BrooklynLauncher application(ApplicationBuilder appBuilder)
start()
or getApplications()
.application(Application)
public BrooklynLauncher application(EntitySpec<? extends StartableApplication> appSpec)
start()
or getApplications()
.application(Application)
public BrooklynLauncher application(java.lang.String yaml)
start()
or getApplications()
.application(Application)
public BrooklynLauncher location(Location location)
start()
, when that calls
application.start(locations)
.public BrooklynLauncher location(java.lang.String spec)
location(Location)
public BrooklynLauncher locations(java.util.List<java.lang.String> specs)
public BrooklynLauncher persistenceLocation(@Nullable java.lang.String persistenceLocationSpec)
public BrooklynLauncher globalBrooklynPropertiesFile(java.lang.String file)
public BrooklynLauncher localBrooklynPropertiesFile(java.lang.String file)
public BrooklynLauncher managementContext(ManagementContext context)
public BrooklynLauncher brooklynProperties(BrooklynProperties brooklynProperties)
public BrooklynLauncher brooklynProperties(java.lang.String field, java.lang.Object value)
public <T> BrooklynLauncher brooklynProperties(ConfigKey<T> key, T value)
public BrooklynLauncher webconsole(boolean startWebApps)
public BrooklynLauncher installSecurityFilter(java.lang.Boolean val)
public BrooklynLauncher webconsolePort(int port)
webconsolePort(PortRange)
taking a single portpublic BrooklynLauncher webconsolePort(java.lang.String port)
webconsolePort(PortRange)
taking a string rangepublic BrooklynLauncher webconsolePort(PortRange port)
public BrooklynLauncher webconsoleHttps(java.lang.Boolean useHttps)
public BrooklynLauncher bindAddress(java.net.InetAddress bindAddress)
public BrooklynLauncher publicAddress(java.net.InetAddress publicAddress)
bindAddress
if it is not 0.0.0.0.bindAddress(java.net.InetAddress)
public BrooklynLauncher webServerFlags(java.util.Map<java.lang.String,?> webServerFlags)
BrooklynWebServer
.public BrooklynLauncher webapp(java.lang.String contextPath, java.lang.String warUrl)
contextPath
- The context path (e.g. "/hello", or equivalently just "hello") where the webapp will be hosted.
"/" will override the brooklyn console webapp.warUrl
- The URL from which the WAR should be loaded, supporting classpath:// protocol in addition to file:// and http(s)://.public BrooklynLauncher ignorePersistenceErrors(boolean ignorePersistenceErrors)
public BrooklynLauncher ignoreCatalogErrors(boolean ignoreCatalogErrors)
public BrooklynLauncher ignoreWebErrors(boolean ignoreWebErrors)
public BrooklynLauncher ignoreAppErrors(boolean ignoreAppErrors)
public BrooklynLauncher stopWhichAppsOnShutdown(StopWhichAppsOnShutdown stopWhich)
public BrooklynLauncher customizeManagement(com.google.common.base.Function<ManagementContext,java.lang.Void> customizeManagement)
@Beta public BrooklynLauncher catalogInitialization(CatalogInitialization catInit)
public BrooklynLauncher shutdownOnExit(boolean val)
public BrooklynLauncher persistMode(PersistMode persistMode)
public BrooklynLauncher highAvailabilityMode(HighAvailabilityMode highAvailabilityMode)
public BrooklynLauncher persistenceDir(@Nullable java.lang.String persistenceDir)
public BrooklynLauncher persistenceDir(@Nullable java.io.File persistenceDir)
public BrooklynLauncher persistPeriod(Duration persistPeriod)
public BrooklynLauncher haHeartbeatTimeout(Duration val)
public BrooklynLauncher startBrooklynNode(boolean val)
public BrooklynLauncher haHeartbeatPeriod(Duration val)
public void copyPersistedState(java.lang.String destinationDir)
destinationDir
- Directory for state to be copied topublic void copyPersistedState(java.lang.String destinationDir, @Nullable java.lang.String destinationLocation)
destinationDir
- Directory for state to be copied todestinationLocation
- Optional location if target for copied state is a blob store.public void copyPersistedState(java.lang.String destinationDir, @Nullable java.lang.String destinationLocationSpec, @Nullable CompoundTransformer transformer)
destinationDir
- Directory for state to be copied todestinationLocationSpec
- Optional location if target for copied state is a blob store.transformer
- Optional transformations to apply to retrieved state before it is copied.@Deprecated public BrooklynMementoRawData retrieveState()
copyPersistedState(java.lang.String)
instead@Deprecated public void persistState(BrooklynMementoRawData memento, java.lang.String destinationDir, @Nullable java.lang.String destinationLocationSpec)
copyPersistedState(java.lang.String)
insteadmemento
- The state to copydestinationDir
- Directory for state to be copied todestinationLocation
- Optional location if target for copied state is a blob store.public BrooklynLauncher start()
public boolean isStarted()
public void terminate()