public class BrooklynLauncher extends 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(String yaml)
Specifies that the launcher should build and manage the Brooklyn application
described by the given YAML blueprint.
|
BrooklynLauncher |
bindAddress(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(String field,
Object value)
Specifies a property to be added to the brooklyn properties
|
BrooklynLauncher |
catalogInitialization(CatalogInitialization catInit) |
void |
copyPersistedState(String destinationDir) |
void |
copyPersistedState(String destinationDir,
String destinationLocation) |
void |
copyPersistedState(String destinationDir,
String destinationLocationSpec,
CompoundTransformer transformer) |
protected void |
createApps() |
BrooklynLauncher |
customizeManagement(com.google.common.base.Function<ManagementContext,Void> customizeManagement) |
protected Application |
getAppFromYaml(String input) |
List<Application> |
getApplications() |
BrooklynServerDetails |
getServerDetails() |
BrooklynLauncher |
globalBrooklynPropertiesFile(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) |
protected void |
initPersistence() |
BrooklynLauncher |
installSecurityFilter(Boolean val) |
boolean |
isStarted() |
BrooklynLauncher |
localBrooklynPropertiesFile(String file) |
BrooklynLauncher |
location(Location location)
Adds a location to be passed in on
start(), when that calls
application.start(locations). |
BrooklynLauncher |
location(String spec)
Give the spec of an application, to be created.
|
BrooklynLauncher |
locations(List<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(File persistenceDir) |
BrooklynLauncher |
persistenceDir(String persistenceDir) |
BrooklynLauncher |
persistenceLocation(String persistenceLocationSpec) |
BrooklynLauncher |
persistMode(PersistMode persistMode) |
BrooklynLauncher |
persistPeriod(Duration persistPeriod) |
void |
persistState(BrooklynMementoRawData memento,
String destinationDir,
String destinationLocationSpec)
Deprecated.
since 0.7.0 use
copyPersistedState(java.lang.String) instead |
BrooklynLauncher |
publicAddress(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.
|
protected void |
startApps() |
protected void |
startBrooklynNode() |
BrooklynLauncher |
startBrooklynNode(boolean val) |
protected void |
startPersistence() |
protected void |
startWebApps() |
BrooklynLauncher |
stopWhichAppsOnShutdown(StopWhichAppsOnShutdown stopWhich) |
void |
terminate()
Terminates this launch, but does not stop the applications (i.e.
|
BrooklynLauncher |
webapp(String contextPath,
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(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(String port)
As
webconsolePort(PortRange) taking a string range |
BrooklynLauncher |
webServerFlags(Map<String,?> webServerFlags)
Specifies additional flags to be passed to
BrooklynWebServer. |
public static BrooklynLauncher newInstance()
public 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(String yaml)
start() or getApplications().application(Application)public BrooklynLauncher location(Location location)
start(), when that calls
application.start(locations).public BrooklynLauncher location(String spec)
location(Location)public BrooklynLauncher locations(List<String> specs)
public BrooklynLauncher persistenceLocation(@Nullable String persistenceLocationSpec)
public BrooklynLauncher globalBrooklynPropertiesFile(String file)
public BrooklynLauncher localBrooklynPropertiesFile(String file)
public BrooklynLauncher managementContext(ManagementContext context)
public BrooklynLauncher brooklynProperties(BrooklynProperties brooklynProperties)
public BrooklynLauncher brooklynProperties(String field, Object value)
public <T> BrooklynLauncher brooklynProperties(ConfigKey<T> key, T value)
public BrooklynLauncher webconsole(boolean startWebApps)
public BrooklynLauncher installSecurityFilter(Boolean val)
public BrooklynLauncher webconsolePort(int port)
webconsolePort(PortRange) taking a single portpublic BrooklynLauncher webconsolePort(String port)
webconsolePort(PortRange) taking a string rangepublic BrooklynLauncher webconsolePort(PortRange port)
public BrooklynLauncher webconsoleHttps(Boolean useHttps)
public BrooklynLauncher bindAddress(InetAddress bindAddress)
public BrooklynLauncher publicAddress(InetAddress publicAddress)
bindAddress if it is not 0.0.0.0.bindAddress(java.net.InetAddress)public BrooklynLauncher webServerFlags(Map<String,?> webServerFlags)
BrooklynWebServer.public BrooklynLauncher webapp(String contextPath, 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,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 String persistenceDir)
public BrooklynLauncher persistenceDir(@Nullable 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(String destinationDir)
destinationDir - Directory for state to be copied topublic void copyPersistedState(String destinationDir, @Nullable String destinationLocation)
destinationDir - Directory for state to be copied todestinationLocation - Optional location if target for copied state is a blob store.public void copyPersistedState(String destinationDir, @Nullable 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, String destinationDir, @Nullable 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()
protected void startWebApps()
protected void initPersistence()
protected void startPersistence()
protected void createApps()
protected void startBrooklynNode()
protected Application getAppFromYaml(String input)
protected void startApps()
public boolean isStarted()
public void terminate()
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.