public class MBeanConnector extends MBeanHelper
JMXConnectorServer
.
In order to use this class, the following system property may need to be set on the monitored cluster nodes (i.e. cache servers):
-Dcoherence.management.remote=trueThe following properties may be used for configuration of the monitoring node:
coherence.management | Specifies if a cluster node's JVM has an in-process MBeanServer and if this node allows management of other nodes' managed objects. Use all to specify management of this and all other remotely manageable cluster nodes |
coherence.management.remote.host | The host that the JMX server will bind to. Default is localhost. |
coherence.management.remote.registryport | The port used for the JMX RMI registry. Default is 9000. |
coherence.management.remote.connectionport | The port used for the JMX RMI connection. Default is ephemeral. |
coherence.management.remote.httpport | The port used for the HTTP connection. Default is 8888. |
MBeanHelper.QueryExpFilter
Base.LoggingWriter, Base.StackFrame
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_HTTP_PORT
Default HTTP port (8888).
|
static int |
DEFAULT_RMI_CONNECTION_PORT
Default RMI connection port (0 ephemeral).
|
static String |
DEFAULT_RMI_HOST
Default RMI host (wildcard).
|
static int |
DEFAULT_RMI_REGISTRY_PORT
Default RMI registry port (9000).
|
static String |
HELP_COMMAND_LINE_ARG
Command line argument used to output usage.
|
static String |
HTTP_COMMAND_LINE_ARG
Command line argument to start HTTP server.
|
static String |
HTTP_PORT_PROPERTY
Property name to specify HTTP port.
|
static String |
RMI_COMMAND_LINE_ARG
Command line argument to start RMI server.
|
static String |
RMI_CONNECTION_PORT_ADJUST_PROPERTY
Property name to specify RMI connection max port.
|
static String |
RMI_CONNECTION_PORT_PROPERTY
Property name to specify RMI connection port.
|
static String |
RMI_CUSTOM_AUTHENTICATOR_PROPERTY
Property name to specify custom RMI Authenticator.
|
static String |
RMI_HOST_PROPERTY
Property name to specify the RMI host.
|
static String |
RMI_REGISTRY_PORT_PROPERTY
Property name to specify RMI registry port.
|
static String[] |
VALID_COMMANDS
Array that contains all valid command line arguments.
|
SCALAR_SIMPLETYPES, SCALAR_TYPES
Constructor and Description |
---|
MBeanConnector() |
Modifier and Type | Method and Description |
---|---|
static int |
getConnectionPort()
Get the configured connection port for the RMI Connector Server.
|
static int |
getConnectionPortMax()
Get the max configured connection port for the RMI Connector Server.
|
static String |
getHostName()
Get the configured host name for the RMI Connector Server.
|
static int |
getRegistryPort()
Get the configured registry port for the RMI Connector Server.
|
static Map |
getRMIConnectorAttributes()
Get the attributes for the RMI Connector Server.
|
static void |
main(String[] asArg)
Start a Coherence cluster node that enables JMX agents such as a web
browser or JConsole to connect to the in-process JMX MBeanServer and
manage Coherence MBeans.
|
static void |
showUsage()
Output usage instructions.
|
void |
start(boolean fRmi,
boolean fHttp)
Start the RMI and/or HTTP agents.
|
Object |
startHttpConnector()
Starts the HTTP connector using the values of the HTTP_* system
properties.
|
JMXConnectorServer |
startRmiConnector()
Starts the RMI connector using the values of the RMI_* system
properties.
|
compareKeyList, createMapAdapterMbean, ensureDomain, ensureSingletonMBean, findJMXServiceUrl, findMBeanServer, findMBeanServer, findMBeanServer, findMethod, findMethod, getDefaultDomain, getDescription, getDescription, getDescription, getNotificationInfo, getParameterAnnotation, getParameterName, hasDomain, isQuoteRequired, isQuoteRequired, quote, quote, quoteCanonical, registerCacheMBean, registerCacheMBean, registerQueryMBeans, safeUnquote, startHttpConnector, startRmiConnector, stripDomain, unquote, unregisterCacheMBean, unregisterCacheMBean, unregisterCacheMBean, unregisterCacheMBean, unregisterCacheMBean, unregisterCacheMBean
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getProcessRandom, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mod, mod, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, wait
public static final String HELP_COMMAND_LINE_ARG
public static final String RMI_COMMAND_LINE_ARG
public static final String HTTP_COMMAND_LINE_ARG
public static final String[] VALID_COMMANDS
public static final String RMI_HOST_PROPERTY
public static final String RMI_CONNECTION_PORT_PROPERTY
public static final String RMI_CONNECTION_PORT_ADJUST_PROPERTY
public static final String RMI_REGISTRY_PORT_PROPERTY
public static final String RMI_CUSTOM_AUTHENTICATOR_PROPERTY
public static final String HTTP_PORT_PROPERTY
public static final String DEFAULT_RMI_HOST
public static final int DEFAULT_RMI_CONNECTION_PORT
public static final int DEFAULT_RMI_REGISTRY_PORT
public static final int DEFAULT_HTTP_PORT
public static void main(String[] asArg) throws Exception
Command line usage:
java com.tangosol.net.management.MBeanConnector [-rmi] and/or [-http]
Use the following command to connect via JConsole when using the -rmi flag:
jconsole service:jmx:rmi://[host]:[RMI Connection port]/jndi/rmi://[host]:[RMI Registry port]/server
To connect via a web browser when using the -http flag:
http://[host]:[HTTP port]
asArg
- the command line argumentsException
- if an error occurspublic void start(boolean fRmi, boolean fHttp)
fRmi
- if true starts the RMI agentfHttp
- if true starts the HTTP agentpublic JMXConnectorServer startRmiConnector() throws IOException
IOException
- if an I/O error occursMBeanHelper.startRmiConnector(String, int, int, MBeanServer, Map)
,
RMI_HOST_PROPERTY
,
RMI_REGISTRY_PORT_PROPERTY
,
RMI_CONNECTION_PORT_PROPERTY
,
DEFAULT_RMI_HOST
,
DEFAULT_RMI_REGISTRY_PORT
,
DEFAULT_RMI_CONNECTION_PORT
public static String getHostName()
public static int getRegistryPort()
public static int getConnectionPort()
public static int getConnectionPortMax()
public static Map getRMIConnectorAttributes()
public Object startHttpConnector()
MBeanHelper.startHttpConnector(int, MBeanServer)
,
HTTP_PORT_PROPERTY
,
DEFAULT_HTTP_PORT
public static void showUsage()