|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jmonks.batch.framework.management.JobConnectorHelper
JobConnectorHelper defines the helper methods will be used in creating the
JMX connector server, registering and unregistering the JMX connector server
in lookup location.
Because of many possible implementations available in creating
the JMX connector server and lookup locations, this class defines the methods
to choose their own implementations. Mainly, Agent looks for the following
information and activities from the concrete implementations of the connector
helper class.
Constructor Summary | |
JobConnectorHelper()
|
Method Summary | |
abstract javax.management.remote.JMXConnectorServer |
createConnectorServer()
Creates the JMX connector server based on the desired connector protocol. |
static JobConnectorHelper |
getJobConnectorHelper(FrameworkConfig.JobConnectorConfig jobConnectorConfig,
JobManagementAgent agent)
This factory method creates the correct implementation of JobConnectorHelper based on the given configuration which is defined in framework-config.xml file. |
protected abstract 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. |
abstract boolean |
registerConnectorServer(JobContext jobContext,
javax.management.remote.JMXConnectorServer connectorServer)
Registers the jmx connector server with the job name taken from job context in the desired lookup location. |
abstract boolean |
unregisterConnectorServer(JobContext jobContext)
Unregisters the jmx connector server registered in desired lookup location with the job name available in job context. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JobConnectorHelper()
Method Detail |
public static JobConnectorHelper getJobConnectorHelper(FrameworkConfig.JobConnectorConfig jobConnectorConfig, JobManagementAgent agent)
<job-connector-config job-connector-helper-class-name="org.jmonks.batch.framework.management.jmxmp.repository.RepositoryJMXMPConnectorHelper"> <property key="mgmt-mntr-config-key">mgmt-mntr-config-value</property> </job-connector-config>
java.lang.SecurityException
- If there is any attempt to create the job connector helper by other than JobManagementAgent.
ConfigurationException
- If configuration could not be found or
implementation class cannot be accessed or instantiated.protected abstract void init(java.util.Map configProps)
configProps
- Properties defined for this connector server as a map.
ConfigurationException
- If required properties for this connector server are missing.public abstract javax.management.remote.JMXConnectorServer createConnectorServer()
public abstract boolean registerConnectorServer(JobContext jobContext, javax.management.remote.JMXConnectorServer connectorServer)
jobContext
- Context of the job is being run.
java.lang.IllegalArgumentException
- If job name paramter is null.public abstract boolean unregisterConnectorServer(JobContext jobContext)
jobContext
- Context of the job is being run.
java.lang.IllegalArgumentException
- If job name paramter is null.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |