|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.launcher.BrooklynWebServer
public class BrooklynWebServer
Starts the web-app running, connected to the given management context
Field Summary | |
---|---|
static java.lang.String |
BROOKLYN_WAR_URL
|
protected java.net.InetAddress |
actualAddress
|
protected int |
actualPort
actual port where this gets bound; will be consistent with the "port" passed in but that might be a range and here it is a single port, or -1 if not yet set |
protected java.net.InetAddress |
bindAddress
IP of NIC where this server should bind, or null to autodetect (e.g. 0.0.0.0 if security is configured, or loopback if no security) |
protected PortRange |
httpsPort
|
protected PortRange |
port
|
protected Server |
server
|
protected java.lang.String |
war
|
Constructor Summary | |
BrooklynWebServer(ManagementContext managementContext)
|
|
BrooklynWebServer(java.util.Map flags, ManagementContext managementContext)
accepts flags: port, war (url of war file which is the root), wars (map of context-prefix to url), attrs (map of attribute-name : object pairs passed to the servlet) |
|
BrooklynWebServer(ManagementContext managementContext, int port)
|
|
BrooklynWebServer(ManagementContext managementContext, int port, java.lang.String warUrl)
|
Method Summary | |
---|---|
BrooklynWebServer
|
addAttribute(java.lang.String field, java.lang.Object value)
@deprecated use setAttribute |
protected void
|
addShutdownHook()
|
BrooklynWebServer
|
addWar(java.lang.String path, java.lang.String warUrl)
specifies a WAR to use at a given context path (only if server not yet started); cf deploy(path, url) |
BrooklynWebServer
|
configure(ConfigKey key, java.lang.Object value)
|
WebAppContext
|
deploy(java.lang.String pathSpec, java.lang.String warUrl)
serve given WAR at the given pathSpec; if not yet started, it is simply remembered until start; if server already running, the context for this WAR is started. |
void
|
deploy(WebAppContext context)
|
int
|
getActualPort()
returns port where this is running, or -1 if not yet known |
java.net.InetAddress
|
getAddress()
interface/address where this server is listening; if bound to 0.0.0.0 (all NICs, e.g. because security is set) this will return one NIC where this is bound |
boolean
|
getHttpsEnabled()
|
PortRange
|
getRequestedPort()
|
WebAppContext
|
getRootContext()
|
java.lang.String
|
getRootUrl()
URL for accessing this web server (root context) |
Server
|
getServer()
|
static void
|
installAsServletFilter(ServletContextHandler context)
|
BrooklynWebServer
|
putAttributes(java.util.Map newAttrs)
Specifies attributes passed to deployed webapps (in addition to BrooklynServiceAttributes#BROOKLYN_MANAGEMENT_CONTEXT#BROOKLYN_MANAGEMENT_CONTEXT |
BrooklynWebServer
|
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 |
BrooklynWebServer
|
setBindAddress(java.net.InetAddress address)
InetAddress to which server should bind; defaults to 0.0.0.0 (although common call path is to set to 127.0.0.1 when security is not set) |
BrooklynWebServer
|
setPort(java.lang.Object port)
|
void
|
setSecurityFilter(java.lang.Class filterClazz)
|
BrooklynWebServer
|
setWar(java.lang.String url)
sets the WAR to use as the root context (only if server not yet started); cf deploy("/", url) |
void
|
start()
|
void
|
stop()
|
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 |
---|
public static final java.lang.String BROOKLYN_WAR_URL
protected java.net.InetAddress actualAddress
protected int actualPort
protected InetAddress bindAddress = null; protected java.net.InetAddress bindAddress
protected PortRange httpsPort = PortRanges.fromString("8443+"); protected PortRange httpsPort
protected PortRange port = PortRanges.fromString("8081+"); protected PortRange port
protected Server server
protected String war = BROOKLYN_WAR_URL; protected java.lang.String war
Constructor Detail |
---|
public BrooklynWebServer(ManagementContext managementContext)
public BrooklynWebServer(java.util.Map flags, ManagementContext managementContext)
public BrooklynWebServer(ManagementContext managementContext, int port)
public BrooklynWebServer(ManagementContext managementContext, int port, java.lang.String warUrl)
Method Detail |
---|
public BrooklynWebServer addAttribute(java.lang.String field, java.lang.Object value)
protected void addShutdownHook()
public BrooklynWebServer addWar(java.lang.String path, java.lang.String warUrl)
public BrooklynWebServer configure(ConfigKey key, java.lang.Object value)
public WebAppContext deploy(java.lang.String pathSpec, java.lang.String warUrl)
public void deploy(WebAppContext context)
public int getActualPort()
public java.net.InetAddress getAddress()
public boolean getHttpsEnabled()
public PortRange getRequestedPort()
public WebAppContext getRootContext()
public java.lang.String getRootUrl()
public Server getServer()
public static void installAsServletFilter(ServletContextHandler context)
public BrooklynWebServer putAttributes(Map newAttrs) { public BrooklynWebServer putAttributes(java.util.Map newAttrs)
public BrooklynWebServer setAttribute(java.lang.String field, java.lang.Object value)
public BrooklynWebServer setBindAddress(java.net.InetAddress address)
public BrooklynWebServer setPort(java.lang.Object port)
public void setSecurityFilter(java.lang.Class filterClazz)
public BrooklynWebServer setWar(java.lang.String url)
public void start()
public void stop()
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.