use of scalabilityTests.framework.listeners.JobResultSchedulerListener in project scheduling by ow2-proactive.
the class SchedulerUser method createEventListener.
@Override
protected SchedulerEventListener createEventListener(String listenerClazzName) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
logger.trace("Trying to load the listener class " + listenerClazzName);
Class listenerClazz = Class.forName(listenerClazzName);
logger.trace("Trying to instantiate a listener of type " + listenerClazzName);
SchedulerEventListener ret = (SchedulerEventListener) listenerClazz.newInstance();
// ugly but necessary; getJobResult MUST be called from the SchedulerUser AO !!
if (ret instanceof JobResultSchedulerListener)
((JobResultSchedulerListener) ret).setResultFetcher((SchedulerUser<JobId>) PAActiveObject.getStubOnThis());
return ret;
}
Aggregations