@Immutable @ThreadSafe public class Server extends Object implements LifecycleAware
| Modifier and Type | Class and Description |
|---|---|
static class |
Server.Builder |
| Constructor and Description |
|---|
Server(String alias,
String pid,
String host,
String port,
String username,
String password,
String protocolProviderPackages,
String url,
String cronExpression,
Integer runPeriodSeconds,
Integer numQueryThreads,
boolean local,
List<Query> queries) |
| Modifier and Type | Method and Description |
|---|---|
static Server.Builder |
builder() |
static Server.Builder |
builder(Server server) |
Iterable<Result> |
execute(Query query,
stormpot.Timeout timeout) |
com.google.common.collect.ImmutableMap<String,?> |
getEnvironment()
Generates the proper username/password environment for JMX connections.
|
String |
getHost() |
JMXConnectionParams |
getJmxConnectionParams() |
JMXServiceURL |
getJmxServiceURL() |
MBeanServer |
getLocalMBeanServer() |
String |
getPort() |
JMXConnector |
getServerConnection()
Helper method for connecting to a Server.
|
String |
getSource() |
String |
getUrl()
The jmx url to connect to.
|
boolean |
isQueriesMultiThreaded() |
void |
shutdown() |
public Iterable<Result> execute(Query query, stormpot.Timeout timeout) throws Exception
Exceptionpublic com.google.common.collect.ImmutableMap<String,?> getEnvironment()
public JMXConnector getServerConnection() throws Exception
Exceptionpublic MBeanServer getLocalMBeanServer()
public String getHost()
public String getSource()
public String getPort()
public String getUrl()
public JMXServiceURL getJmxServiceURL() throws IOException
IOExceptionpublic boolean isQueriesMultiThreaded()
public JMXConnectionParams getJmxConnectionParams() throws IOException
IOExceptionpublic void shutdown()
shutdown in interface LifecycleAwarepublic static Server.Builder builder()
public static Server.Builder builder(Server server)
Copyright © 2010-2015 JmxTrans team. All Rights Reserved.