Brooklyn

brooklyn.launcher
[Java] Class BrooklynLauncher

java.lang.Object
  brooklyn.launcher.BrooklynLauncher

public class BrooklynLauncher

Field Summary
protected static Logger LOG

 
Method Summary
BrooklynServerDetails launch()

Starts the web server (with web console) and Brooklyn applications, as per the specifications configured.

static ManagementContext manage(AbstractApplication app)

Launches the web console on port 8081, and a Brooklyn application, with a single command, in such a way that the web console is launched and the application is shutdown on server termination.

static ManagementContext manage(AbstractApplication app, int port)

Launches the web console on the given port, and a Brooklyn application, with a single command, in such a way that the web console is launched and the application is shutdown on server termination.

static ManagementContext manage(AbstractApplication app, int port, boolean shutdownApp, boolean startWebConsole)

Launches the web console on the given port, and a Brooklyn application, with a single command.

BrooklynLauncher management(ManagementContext context)

Specifies the management context this launcher should use.

BrooklynLauncher managing(Application app)

Specifies that the launcher should manage the given Brooklyn application.

static BrooklynLauncher newLauncher()

Creates a configurable (fluent API) launcher for use starting the web console and Brooklyn applications.

BrooklynLauncher setAttribute(java.lang.String field, java.lang.Object value)

Specifies an attribute passed to deployed webapps (in addition to BrooklynServiceAttributes#BROOKLYN_MANAGEMENT_CONTEXT#BROOKLYN_MANAGEMENT_CONTEXT

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 webconsolePort(int port)

Specifies the port where the web console (and any additional webapps specified) will listed; default "8081+" being the first available >= 8081.

BrooklynLauncher webconsolePort(java.lang.String port)

Specifies the port where the web console (and any additional webapps specified) will listed; default "8081+" being the first available >= 8081.

BrooklynLauncher webconsolePort(PortRange port)

Specifies the port where the web console (and any additional webapps specified) will listed; default "8081+" being the first available >= 8081.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Field Detail

LOG

protected static final Logger LOG


 
Method Detail

launch

public BrooklynServerDetails launch()
Starts the web server (with web console) and Brooklyn applications, as per the specifications configured.
Returns:
An object containing details of the web server and the management context.


manage

public static ManagementContext manage(AbstractApplication app)
Launches the web console on port 8081, and a Brooklyn application, with a single command, in such a way that the web console is launched and the application is shutdown on server termination. For readability and flexibility, clients may prefer the newLauncher() fluent syntax.


manage

public static ManagementContext manage(AbstractApplication app, int port)
Launches the web console on the given port, and a Brooklyn application, with a single command, in such a way that the web console is launched and the application is shutdown on server termination. For readability and flexibility, clients may prefer the newLauncher() fluent syntax.


manage

public static ManagementContext manage(AbstractApplication app, int port, boolean shutdownApp, boolean startWebConsole)
Launches the web console on the given port, and a Brooklyn application, with a single command. For readability and flexibility, clients may prefer the newLauncher() builder-style syntax.


management

public BrooklynLauncher management(ManagementContext context)
Specifies the management context this launcher should use. If not specified a new LocalManagementContext is used.


managing

public BrooklynLauncher managing(Application app)
Specifies that the launcher should manage the given Brooklyn application. The application will not be started as part of this call (callers should start it when appropriate, often after the launcher is launched). The application must not yet be managed.


newLauncher

public static BrooklynLauncher newLauncher()
Creates a configurable (fluent API) launcher for use starting the web console and Brooklyn applications.


setAttribute

public BrooklynLauncher setAttribute(java.lang.String field, java.lang.Object value)
Specifies an attribute passed to deployed webapps (in addition to BrooklynServiceAttributes#BROOKLYN_MANAGEMENT_CONTEXT#BROOKLYN_MANAGEMENT_CONTEXT


webapp

public BrooklynLauncher webapp(java.lang.String contextPath, java.lang.String warUrl)
Specifies an additional webapp to host on the webconsole port.
Parameters:
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)://.


webconsole

public BrooklynLauncher webconsole(boolean startWebApps)
Specifies whether the launcher will start the Brooklyn web console (and any additional webapps specified); default true.


webconsolePort

public BrooklynLauncher webconsolePort(int port)
Specifies the port where the web console (and any additional webapps specified) will listed; default "8081+" being the first available >= 8081.


webconsolePort

public BrooklynLauncher webconsolePort(java.lang.String port)
Specifies the port where the web console (and any additional webapps specified) will listed; default "8081+" being the first available >= 8081.


webconsolePort

public BrooklynLauncher webconsolePort(PortRange port)
Specifies the port where the web console (and any additional webapps specified) will listed; default "8081+" being the first available >= 8081.


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.