@ConfigurationProperties(value="jmx")
public class JmxConfiguration
extends java.lang.Object
ignoreAgentNotFound
is true.
Next the default platform MBean server will be retrieved. If an error
is thrown, a new MBean server will be created using the domain
.
The newly created server will be registered with the MBeanFactory if
addToFactory
is true.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PREFIX |
Constructor and Description |
---|
JmxConfiguration() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAgentId()
If specified, it is expected the
MBeanServerFactory.findMBeanServer(java.lang.String)
will return a server. |
java.lang.String |
getDomain()
Used if
getAgentId() returns null and
ManagementFactory.getPlatformMBeanServer() throws
an exception. |
boolean |
isAddToFactory()
Only used if
getAgentId() returns null and
ManagementFactory.getPlatformMBeanServer() throws
an exception. |
boolean |
isIgnoreAgentNotFound()
If a server could not be found with the
agentId ,
an exception will be thrown unless this method returns
true. |
boolean |
isRegisterEndpoints()
If management beans should be registered for endpoints.
|
void |
setAddToFactory(boolean addToFactory)
Sets if the server should be kept in the factory.
|
void |
setAgentId(java.lang.String agentId)
Sets the agent id.
|
void |
setDomain(java.lang.String domain)
Sets the domain to create a new server with.
|
void |
setIgnoreAgentNotFound(boolean ignoreAgentNotFound)
Sets to ignore the exception if the agent is not found.
|
void |
setRegisterEndpoints(boolean registerEndpoints)
Sets if endpoints should be registered.
|
public static final java.lang.String PREFIX
public java.lang.String getAgentId()
MBeanServerFactory.findMBeanServer(java.lang.String)
will return a server. An error will be thrown otherwise.public void setAgentId(java.lang.String agentId)
agentId
- The agent idpublic java.lang.String getDomain()
getAgentId()
returns null and
ManagementFactory.getPlatformMBeanServer()
throws
an exception.public void setDomain(java.lang.String domain)
domain
- The domainpublic boolean isAddToFactory()
getAgentId()
returns null and
ManagementFactory.getPlatformMBeanServer()
throws
an exception.MBeanServerFactory
public void setAddToFactory(boolean addToFactory)
addToFactory
- The add to factory flagpublic boolean isIgnoreAgentNotFound()
agentId
,
an exception will be thrown unless this method returns
true.public void setIgnoreAgentNotFound(boolean ignoreAgentNotFound)
ignoreAgentNotFound
- The ignoreAgentNotFoundpublic boolean isRegisterEndpoints()
public void setRegisterEndpoints(boolean registerEndpoints)
registerEndpoints
- The flag