@ConfigurationProperties(value="jmx") public class JmxConfiguration extends 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.| Constructor and Description |
|---|
JmxConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAgentId()
If specified, it is expected the
MBeanServerFactory.findMBeanServer(java.lang.String)
will return a server. |
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(String agentId)
Sets the agent id.
|
void |
setDomain(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 String PREFIX
public String getAgentId()
MBeanServerFactory.findMBeanServer(java.lang.String)
will return a server. An error will be thrown otherwise.public void setAgentId(String agentId)
agentId - The agent idpublic String getDomain()
getAgentId() returns null and
ManagementFactory.getPlatformMBeanServer() throws
an exception.public void setDomain(String domain)
domain - The domainpublic boolean isAddToFactory()
getAgentId() returns null and
ManagementFactory.getPlatformMBeanServer() throws
an exception.MBeanServerFactorypublic 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