public class BasicLauncher<T extends BasicLauncher<T>> extends Object
{@code
BasicLauncher launcher = BasicLauncher.newInstance()
.application(new WebClusterDatabaseExample().appDisplayName("Web-cluster example"))
.location("localhost")
.start();
Entities.dumpInfo(launcher.getApplications());
| Constructor and Description |
|---|
BasicLauncher() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addLocations() |
T |
application(org.apache.brooklyn.api.entity.Application app)
Deprecated.
since 0.9.0; instead use
application(String) for YAML apps, or application(EntitySpec).
Note that apps are now auto-managed on construction through EntitySpec/YAML. |
T |
application(ApplicationBuilder appBuilder)
Deprecated.
since 0.9.0; instead use
application(String) for YAML apps, or application(EntitySpec).
Note that apps are now auto-managed on construction through EntitySpec/YAML. |
T |
application(org.apache.brooklyn.api.entity.EntitySpec<? extends StartableApplication> appSpec)
Specifies that the launcher should build and manage the Brooklyn application
described by the given spec.
|
T |
application(String yaml)
Specifies that the launcher should build and manage the Brooklyn application
described by the given YAML blueprint.
|
T |
brooklynProperties(BrooklynProperties brooklynProperties)
Specifies the brooklyn properties to be used.
|
<C> T |
brooklynProperties(ConfigKey<C> key,
C value) |
T |
brooklynProperties(String field,
Object value)
Specifies a property to be added to the brooklyn properties
|
T |
catalogInitialization(CatalogInitialization catInit) |
void |
cleanOrphanedState(String destinationDir,
String destinationLocationSpec) |
void |
copyPersistedState(String destinationDir) |
void |
copyPersistedState(String destinationDir,
String destinationLocation) |
void |
copyPersistedState(String destinationDir,
String destinationLocationSpec,
CompoundTransformer transformer) |
protected void |
createApps() |
protected org.apache.brooklyn.api.entity.EntitySpec<LocalBrooklynNode> |
customizeBrooklynNodeSpec(org.apache.brooklyn.api.entity.EntitySpec<LocalBrooklynNode> brooklynNodeSpec)
Configure the node so it can connect to Brooklyn's REST API.
|
List<org.apache.brooklyn.api.entity.Application> |
getApplications() |
BrooklynProperties |
getBrooklynProperties() |
BrooklynProperties.Factory.Builder |
getBrooklynPropertiesBuilder() |
org.apache.brooklyn.camp.CampPlatform |
getCampPlatform() |
List<org.apache.brooklyn.api.location.Location> |
getLocations() |
org.apache.brooklyn.api.mgmt.ManagementContext |
getManagementContext() |
PersistMode |
getPersistMode() |
T |
haHeartbeatPeriod(Duration val)
Controls both the frequency of heartbeats, and the frequency of checking the health of other nodes.
|
T |
haHeartbeatTimeout(Duration val) |
protected void |
handlePersistence() |
protected void |
handleSubsystemStartupError(boolean ignoreSuchErrors,
String system,
Exception e) |
T |
highAvailabilityMode(org.apache.brooklyn.api.mgmt.ha.HighAvailabilityMode highAvailabilityMode) |
T |
ignoreAppErrors(boolean ignoreAppErrors) |
T |
ignoreCatalogErrors(boolean ignoreCatalogErrors) |
T |
ignorePersistenceErrors(boolean ignorePersistenceErrors) |
protected void |
initApps() |
protected void |
initBrooklynNode() |
protected void |
initCamp() |
protected void |
initManagementContext() |
protected void |
initPersistence() |
boolean |
isStarted() |
T |
location(org.apache.brooklyn.api.location.Location location)
Adds a location to be passed in on
start(), when that calls
application.start(locations). |
T |
location(String spec)
Give the spec of an application, to be created.
|
T |
locations(List<String> specs) |
T |
managementContext(org.apache.brooklyn.api.mgmt.ManagementContext context)
Specifies the management context this launcher should use.
|
protected void |
markCatalogStartingUp(CatalogInitialization catInit) |
protected void |
markStartupComplete() |
protected void |
persist() |
T |
persistenceDir(File persistenceDir) |
T |
persistenceDir(String persistenceDir) |
T |
persistenceLocation(String persistenceLocationSpec) |
T |
persistMode(PersistMode persistMode) |
T |
persistPeriod(Duration persistPeriod) |
void |
persistState(org.apache.brooklyn.api.mgmt.rebind.mementos.BrooklynMementoRawData memento,
String destinationDir,
String destinationLocationSpec)
Deprecated.
since 0.7.0 use
copyPersistedState(java.lang.String) instead |
protected void |
populateCatalog(CatalogInitialization catInit) |
org.apache.brooklyn.api.mgmt.rebind.mementos.BrooklynMementoRawData |
retrieveState()
Deprecated.
since 0.7.0 use
copyPersistedState(java.lang.String) instead |
void |
setBrooklynPropertiesBuilder(BrooklynProperties.Factory.Builder brooklynPropertiesBuilder) |
T |
start()
Starts the web server (with web console) and Brooklyn applications, as per the specifications configured.
|
protected void |
startApps() |
protected void |
startBrooklynNode() |
T |
startBrooklynNode(boolean val) |
protected void |
startingUp() |
protected void |
startPersistence() |
public org.apache.brooklyn.api.mgmt.ManagementContext getManagementContext()
public List<org.apache.brooklyn.api.entity.Application> getApplications()
@Deprecated public T application(org.apache.brooklyn.api.entity.Application app)
application(String) for YAML apps, or application(EntitySpec).
Note that apps are now auto-managed on construction through EntitySpec/YAML.start() or getApplications().application(ApplicationBuilder)public T application(ApplicationBuilder appBuilder)
application(String) for YAML apps, or application(EntitySpec).
Note that apps are now auto-managed on construction through EntitySpec/YAML.start() or getApplications().application(EntitySpec)public T application(org.apache.brooklyn.api.entity.EntitySpec<? extends StartableApplication> appSpec)
start() or getApplications().application(Application)public T application(String yaml)
start() or getApplications().application(Application)public T location(org.apache.brooklyn.api.location.Location location)
start(), when that calls
application.start(locations).public T location(String spec)
location(Location)public T managementContext(org.apache.brooklyn.api.mgmt.ManagementContext context)
public T brooklynProperties(BrooklynProperties brooklynProperties)
public T brooklynProperties(String field, Object value)
public T ignorePersistenceErrors(boolean ignorePersistenceErrors)
public T ignoreCatalogErrors(boolean ignoreCatalogErrors)
public T ignoreAppErrors(boolean ignoreAppErrors)
@Beta public T catalogInitialization(CatalogInitialization catInit)
public T persistMode(PersistMode persistMode)
public T highAvailabilityMode(org.apache.brooklyn.api.mgmt.ha.HighAvailabilityMode highAvailabilityMode)
public T startBrooklynNode(boolean val)
public T 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.public void cleanOrphanedState(String destinationDir, @Nullable String destinationLocationSpec)
@Deprecated public org.apache.brooklyn.api.mgmt.rebind.mementos.BrooklynMementoRawData retrieveState()
copyPersistedState(java.lang.String) instead@Deprecated public void persistState(org.apache.brooklyn.api.mgmt.rebind.mementos.BrooklynMementoRawData memento, String destinationDir, @Nullable String destinationLocationSpec)
copyPersistedState(java.lang.String) insteadmemento - The state to copydestinationDir - Directory for state to be copied todestinationLocationSpec - Optional location if target for copied state is a blob store.public T start()
protected void persist()
protected void initBrooklynNode()
protected void initApps()
protected void markStartupComplete()
protected void addLocations()
protected void startingUp()
protected void populateCatalog(CatalogInitialization catInit)
protected void handlePersistence()
protected void initCamp()
protected void markCatalogStartingUp(CatalogInitialization catInit)
protected void initManagementContext()
protected void handleSubsystemStartupError(boolean ignoreSuchErrors,
String system,
Exception e)
protected void initPersistence()
protected void startPersistence()
protected void createApps()
protected void startBrooklynNode()
protected org.apache.brooklyn.api.entity.EntitySpec<LocalBrooklynNode> customizeBrooklynNodeSpec(org.apache.brooklyn.api.entity.EntitySpec<LocalBrooklynNode> brooklynNodeSpec)
protected void startApps()
public boolean isStarted()
public PersistMode getPersistMode()
public List<org.apache.brooklyn.api.location.Location> getLocations()
public org.apache.brooklyn.camp.CampPlatform getCampPlatform()
public void setBrooklynPropertiesBuilder(BrooklynProperties.Factory.Builder brooklynPropertiesBuilder)
public BrooklynProperties.Factory.Builder getBrooklynPropertiesBuilder()
public BrooklynProperties getBrooklynProperties()
Copyright © 2012–2016 The Apache Software Foundation. All rights reserved.