Package org.apache.uima.aae.jmx
Class RemoteJMXServer
java.lang.Object
org.apache.uima.aae.jmx.RemoteJMXServer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
attachToTempQueue
(String tempQueueName) void
Disconnects from MBeanServervoid
initialize
(String jmxDomain, String remoteJMXServerHostname, String remoteJMXServerPort) Creates a connection to an MBean Server identified byremoteJMXServerHostName and remoteJMXServerPort
boolean
isClientReplyQueueAvailable
(String queueName) Checks if a given queue name exists in remote MBeanServer's registry.boolean
boolean
Tries to fetch total number of MBeans in the MBeanServer.static void
Replaces ':' with '_'.
-
Constructor Details
-
RemoteJMXServer
public RemoteJMXServer()
-
-
Method Details
-
isInitialized
public boolean isInitialized() -
initialize
public void initialize(String jmxDomain, String remoteJMXServerHostname, String remoteJMXServerPort) throws Exception Creates a connection to an MBean Server identified byremoteJMXServerHostName and remoteJMXServerPort
- Parameters:
remoteJMXServerHostName
- - MBeanServer host nameremoteJMXServerPort
- - MBeanServer port- Throws:
Exception
-
disconnect
public void disconnect()Disconnects from MBeanServer -
isServerAvailable
public boolean isServerAvailable()Tries to fetch total number of MBeans in the MBeanServer. The real goal here is to check if the server responds. Failure here indicates failed server connection.- Returns:
-
attachToTempQueue
- Throws:
Exception
-
isClientReplyQueueAvailable
Checks if a given queue name exists in remote MBeanServer's registry. NOTE: The code returns true in case the MBeanServer is not available.- Parameters:
queueName
- - queue to lookup in the MBeanServer- Returns:
- - true if queue exists, false otherwise
-
normalize
Replaces ':' with '_'. JMX queries containing ':' are illegal.- Parameters:
destinationName
-- Returns:
-
main
-