org.apache.uima.aae.jmx
Class RemoteJMXServer

java.lang.Object
  extended by org.apache.uima.aae.jmx.RemoteJMXServer

public class RemoteJMXServer
extends java.lang.Object


Constructor Summary
RemoteJMXServer()
           
 
Method Summary
 void attachToTempQueue(java.lang.String tempQueueName)
           
 void disconnect()
          Disconnects from MBeanServer
 void initialize(java.lang.String jmxDomain, java.lang.String remoteJMXServerHostname, java.lang.String remoteJMXServerPort)
          Creates a connection to an MBean Server identified by remoteJMXServerHostName and remoteJMXServerPort
 boolean isClientReplyQueueAvailable(java.lang.String queueName)
          Checks if a given queue name exists in remote MBeanServer's registry.
 boolean isInitialized()
           
 boolean isServerAvailable()
          Tries to fetch total number of MBeans in the MBeanServer.
static void main(java.lang.String[] args)
           
 java.lang.String normalize(java.lang.String destinationName)
          Replaces ':' with '_'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteJMXServer

public RemoteJMXServer()
Method Detail

isInitialized

public boolean isInitialized()

initialize

public void initialize(java.lang.String jmxDomain,
                       java.lang.String remoteJMXServerHostname,
                       java.lang.String remoteJMXServerPort)
                throws java.lang.Exception
Creates a connection to an MBean Server identified by remoteJMXServerHostName and remoteJMXServerPort

Parameters:
remoteJMXServerHostName - - MBeanServer host name
remoteJMXServerPort - - MBeanServer port
Throws:
java.lang.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

public void attachToTempQueue(java.lang.String tempQueueName)
                       throws java.lang.Exception
Throws:
java.lang.Exception

isClientReplyQueueAvailable

public boolean isClientReplyQueueAvailable(java.lang.String queueName)
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

public java.lang.String normalize(java.lang.String destinationName)
Replaces ':' with '_'. JMX queries containing ':' are illegal.

Parameters:
destinationName -
Returns:

main

public static void main(java.lang.String[] args)


Copyright © 2011. All Rights Reserved.