public class JolokiaServer extends Object
Modifier | Constructor and Description |
---|---|
protected |
JolokiaServer()
No arg constructor usable by subclasses.
|
|
JolokiaServer(com.sun.net.httpserver.HttpServer pServer,
JolokiaServerConfig pConfig,
boolean pLazy)
Create the Jolokia server by using an existing HttpServer to which a request handler
gets added.
|
|
JolokiaServer(JolokiaServerConfig pConfig,
boolean pLazy)
Create the Jolokia server which in turn creates an HttpServer for serving Jolokia requests.
|
Modifier and Type | Method and Description |
---|---|
InetSocketAddress |
getAddress() |
JolokiaServerConfig |
getServerConfig()
Get configuration for this server
|
String |
getUrl()
URL how this agent can be reached from the outside.
|
protected void |
init(com.sun.net.httpserver.HttpServer pServer,
JolokiaServerConfig pConfig,
boolean pLazy)
Initialize this JolokiaServer with the given HttpServer.
|
protected void |
init(JolokiaServerConfig pConfig,
boolean pLazy)
Initialize this JolokiaServer and use an own created HttpServer
|
void |
start()
Start this server.
|
void |
stop()
Stop the HTTP server
|
public JolokiaServer(JolokiaServerConfig pConfig, boolean pLazy) throws IOException
pConfig
- configuration for this serverpLazy
- lazy initialisation if true. This is required for agents
configured via startup options since at this early boot time
the JVM is not fully setup for the server detectors to workIOException
- if initialization failspublic JolokiaServer(com.sun.net.httpserver.HttpServer pServer, JolokiaServerConfig pConfig, boolean pLazy)
pServer
- HttpServer to usepConfig
- configuration for this serverpLazy
- lazy initialisation if true. This is required for agents
configured via startup options since at this early boot time
the JVM is not fully setup for the server detectors to workprotected JolokiaServer()
init(JolokiaServerConfig, boolean)
must be called later on
for initializationpublic void start()
public void stop()
public String getUrl()
public JolokiaServerConfig getServerConfig()
protected final void init(JolokiaServerConfig pConfig, boolean pLazy) throws IOException
pConfig
- configuartion to usepLazy
- whether to do the inialization lazy or notIOException
- if the creation of the HttpServer failsprotected final void init(com.sun.net.httpserver.HttpServer pServer, JolokiaServerConfig pConfig, boolean pLazy)
pServer
- server to usepConfig
- configurationpLazy
- whether the initialization should be done lazy or notpublic InetSocketAddress getAddress()
Copyright © 2019. All rights reserved.