org.xfp.engine
Class PipelineJobListener

java.lang.Object
  extended byorg.xfp.AttributeContainer
      extended byorg.xfp.Pipeline
          extended byorg.xfp.engine.PipelineJobListener
All Implemented Interfaces:
org.quartz.JobListener, TaskJobListener

public class PipelineJobListener
extends Pipeline
implements TaskJobListener

A Quartz JobListener wrapper around Pipeline.

"If your job creation is expensive (for simple jobs/objects, it's really not expensive, unless you're talking on the scale of hundreds of objects per seconds) - you could put your jobs real work into a JobListener, and then schedule a 'fake' NoOpJob to be triggered (so that the listener gets notified). james"

Read original thread

Version:
$Id: PipelineJobListener.java,v 1.1 2004/03/19 15:56:43 flaviotordini Exp $
Author:
FlavioTordini

Field Summary
 
Fields inherited from class org.xfp.Pipeline
logger
 
Fields inherited from class org.xfp.AttributeContainer
parentContainer
 
Constructor Summary
PipelineJobListener(java.lang.String taskName, java.io.File workingDir, org.w3c.dom.Document pipelineDocument, AttributeContainer parent, org.apache.log4j.spi.LoggerRepository loggerRepository)
          Sole constructor.
 
Method Summary
 java.lang.String getName()
           
 void jobToBeExecuted(org.quartz.JobExecutionContext arg0)
          Calls the Pipeline execute() method.
 void jobWasExecuted(org.quartz.JobExecutionContext arg0, org.quartz.JobExecutionException arg1)
          No op.
 
Methods inherited from class org.xfp.Pipeline
execute, getFilters, isRunning, toString
 
Methods inherited from class org.xfp.AttributeContainer
configureAttributes, disposeAttributes, getAttributes, getFullName, initializeAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xfp.engine.TaskJobListener
isRunning
 

Constructor Detail

PipelineJobListener

public PipelineJobListener(java.lang.String taskName,
                           java.io.File workingDir,
                           org.w3c.dom.Document pipelineDocument,
                           AttributeContainer parent,
                           org.apache.log4j.spi.LoggerRepository loggerRepository)
                    throws java.lang.Exception
Sole constructor.

See Also:
Pipeline
Method Detail

jobToBeExecuted

public void jobToBeExecuted(org.quartz.JobExecutionContext arg0)
Calls the Pipeline execute() method.

Specified by:
jobToBeExecuted in interface org.quartz.JobListener
See Also:
JobListener.jobToBeExecuted(org.quartz.JobExecutionContext)

jobWasExecuted

public void jobWasExecuted(org.quartz.JobExecutionContext arg0,
                           org.quartz.JobExecutionException arg1)
No op.

Specified by:
jobWasExecuted in interface org.quartz.JobListener
See Also:
JobListener.jobWasExecuted(org.quartz.JobExecutionContext, org.quartz.JobExecutionException)

getName

public java.lang.String getName()
Specified by:
getName in interface org.quartz.JobListener
Overrides:
getName in class AttributeContainer
Returns:
Returns the name of this attribute container.
See Also:
JobListener.getName()


Copyright © 2003-2004 XFP Team. All Rights Reserved.