org.jmonks.batch.framework.management.jmxmp
Class RepositoryJMXMPConnectorHelper

java.lang.Object
  extended byorg.jmonks.batch.framework.management.JobConnectorHelper
      extended byorg.jmonks.batch.framework.management.jmxmp.JMXMPConnectorHelper
          extended byorg.jmonks.batch.framework.management.jmxmp.RepositoryJMXMPConnectorHelper

public class RepositoryJMXMPConnectorHelper
extends JMXMPConnectorHelper

This connector is based on JMX Messaging protocol and uses the framework reposiotry as the lookup location to register and unregister the JMX Service URL.

Since:
1.0
Version:
1.0
Author:
Suresh Pragada

Constructor Summary
RepositoryJMXMPConnectorHelper()
           
 
Method Summary
 void init(java.util.Map configProps)
          This method will be called after instantiating the JobConnectorHelper to initialize JobConnectorHelper with the properties needed to create JMX connector server and initialize the lookup location needed to register and unregister the JMX connector servers.
 boolean registerConnectorServer(JobContext jobContext, javax.management.remote.JMXConnectorServer jmxConnectorServer)
          Registers the jmx connector server with the job name taken from job context in the repository defined for this framework.
 boolean unregisterConnectorServer(JobContext jobContext)
          Unregisters the jmx connector server registered in repository with the job name available in job context.
 
Methods inherited from class org.jmonks.batch.framework.management.jmxmp.JMXMPConnectorHelper
createConnectorServer
 
Methods inherited from class org.jmonks.batch.framework.management.JobConnectorHelper
getJobConnectorHelper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryJMXMPConnectorHelper

public RepositoryJMXMPConnectorHelper()
Method Detail

init

public void init(java.util.Map configProps)
Description copied from class: JobConnectorHelper
This method will be called after instantiating the JobConnectorHelper to initialize JobConnectorHelper with the properties needed to create JMX connector server and initialize the lookup location needed to register and unregister the JMX connector servers.

Specified by:
init in class JobConnectorHelper
Parameters:
configProps - Properties defined for this connector server as a map.
See Also:
org.jmonks.batch.framework.management.JobConnectorHelper@init(java.util.Map)

registerConnectorServer

public boolean registerConnectorServer(JobContext jobContext,
                                       javax.management.remote.JMXConnectorServer jmxConnectorServer)
Registers the jmx connector server with the job name taken from job context in the repository defined for this framework. Repository reference will also be taken from job context.

Specified by:
registerConnectorServer in class JobConnectorHelper
Parameters:
jobContext - Context of the job is being run.
jmxConnectorServer - JMX connector server identifies where all the manager and montiro mbeans are configured.
Returns:
Returns true, if it successfully registred in repository, false, otherwise.
Throws:
java.lang.IllegalArgumentException - If job name paramter or jmxConnectorServer parameter is null.

unregisterConnectorServer

public boolean unregisterConnectorServer(JobContext jobContext)
Unregisters the jmx connector server registered in repository with the job name available in job context.

Specified by:
unregisterConnectorServer in class JobConnectorHelper
Parameters:
jobContext - Context of the job is begin run.
Returns:
Returns true, if it successfully unregistered, false otherwise.
Throws:
java.lang.IllegalArgumentException - If job name paramter is null.