return scheduler_.getListenerManager().removeJobListener(name);
}
public void addJobListener(AddJobListenerComponentPlugin plugin) throws Exception
{
JobListener jl = (JobListener)plugin;
try
{
List<Matcher<JobKey>> matchers = null;
if (plugin.getKeys() != null)
{
matchers = new ArrayList<Matcher<JobKey>>();
for (org.exoplatform.services.scheduler.JobKey key : plugin.getKeys())
{
matchers.add(KeyMatcher.keyEquals(JobKey.jobKey(key.getName(), getGroupName(key.getGroup()))));
}
}
scheduler_.getListenerManager().addJobListener(jl, matchers);
}
catch (Exception e)
{
LOG.warn("Could not add the job listener (" + jl.getName() + ") defined in the plugin " + plugin.getName()
+ " : " + e.getMessage());
}
}