Methods Summary |
---|
public javax.management.ObjectName | getTargetName()
return mSingletonMBean;
|
public java.lang.String | getTargetStartMethod()
return mSingletonMBeanStartMethod;
|
public java.lang.String | getTargetStartMethodArgument()
return mSingletonMBeanStartMethodArgument ;
|
public java.lang.String | getTargetStopMethod()
return mSingletonMBeanStopMethod;
|
public java.lang.String | getTargetStopMethodArgument()
return mSingletonMBeanStopMethodArgument ;
|
protected java.lang.Object | invokeSingletonMBeanMethod(javax.management.ObjectName target, java.lang.String operationName, java.lang.Object param)
if (target != null && operationName != null)
{
Object[] params;
String[] signature;
if (param != null)
{
params = new Object[] { param };
signature = new String[] { param.getClass().getName() };
log.debug("Calling operation: " + operationName +
"(" + param + "), on target: '" + target + "'");
}
else
{
params = NO_ARGS;
signature = NO_TYPES;
log.debug("Calling operation: " + operationName +
"(), on target: '" + target + "'");
}
return server.invoke(target, operationName, params, signature);
}
else
{
log.debug("No configured target mbean or operation to call");
return null;
}
|
public void | setTargetName(javax.management.ObjectName targetObjectName)
this.mSingletonMBean = targetObjectName;
|
public void | setTargetStartMethod(java.lang.String targetStartMethod)
if (targetStartMethod != null)
mSingletonMBeanStartMethod = targetStartMethod;
|
public void | setTargetStartMethodArgument(java.lang.String targetStartMethodArgument)
mSingletonMBeanStartMethodArgument = targetStartMethodArgument;
|
public void | setTargetStopMethod(java.lang.String targetStopMethod)
if (targetStopMethod != null)
mSingletonMBeanStopMethod = targetStopMethod;
|
public void | setTargetStopMethodArgument(java.lang.String targetStopMethodArgument)
mSingletonMBeanStopMethodArgument = targetStopMethodArgument;
|
public void | startSingleton()Call the target start method
super.startSingleton();
try
{
invokeSingletonMBeanMethod(
mSingletonMBean,
mSingletonMBeanStartMethod,
mSingletonMBeanStartMethodArgument
);
}
catch (JMException jme)
{
log.error("Controlled Singleton MBean failed to become master", jme);
}
|
public void | stopSingleton()Call the target stop method
super.stopSingleton();
try
{
invokeSingletonMBeanMethod(
mSingletonMBean,
mSingletonMBeanStopMethod,
mSingletonMBeanStopMethodArgument
);
}
catch (JMException jme)
{
log.error("Controlled Singleton MBean failed to resign from master position", jme);
}
|