Search in sources :

Example 1 with JobResultSchedulerListener

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;
}
Also used : JobResultSchedulerListener(scalabilityTests.framework.listeners.JobResultSchedulerListener) SchedulerEventListener(org.ow2.proactive.scheduler.common.SchedulerEventListener)

Aggregations

SchedulerEventListener (org.ow2.proactive.scheduler.common.SchedulerEventListener)1 JobResultSchedulerListener (scalabilityTests.framework.listeners.JobResultSchedulerListener)1