Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.quartz.jobs
Class FileScanJob

    java.lang.Object
      org.quartz.jobs.FileScanJob

All Implemented Interfaces:
  Job, StatefulJob

    public class FileScanJob

extends Object
implements StatefulJob

Inspects a file and compares whether it's "last modified date" has changed since the last time it was inspected. If the file has been updated, the job invokes a "call-back" method on an identified `FileScanListener` that can be found in the `SchedulerContext`.

Author:
  jhouse, pl47ypus
See Also:
  `FileScanListener`

Field Summary
`static String` | `FILE_NAME`
`static String` | `FILE_SCAN_LISTENER_NAME`

Constructor Summary
`FileScanJob()`

Method Summary
`void` | `execute(JobExecutionContext context)` Called by the ``Scheduler`` when a ``Trigger`` fires that is associated with the `Job`.
`protected long` | `getLastModifiedDate(String fileName)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### FILE_NAME

    public static final String FILE_NAME

See Also:
  Constant Field Values

### FILE_SCAN_LISTENER_NAME

    public static final String FILE_SCAN_LISTENER_NAME

See Also:
  Constant Field Values

Constructor Detail

### FileScanJob

    public FileScanJob()

Method Detail

### execute

    public void execute(JobExecutionContext context)
                 throws JobExecutionException

  Description copied from interface: `Job`

  Called by the ``Scheduler`` when a ``Trigger`` fires that is associated with the `Job`.

  The implementation may wish to set a `result` object on the `JobExecutionContext` before this method exits. The result itself is meaningless to Quartz, but may be informative to ``JobListener`s` or ``TriggerListener`s` that are watching the job's execution.

  Specified by:
    `execute` in interface `Job`
  Throws:
    `JobExecutionException` - if there is an exception while executing the job.
  See Also:
    `Job.execute(org.quartz.JobExecutionContext)`

### getLastModifiedDate

    protected long getLastModifiedDate(String fileName)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001-2012, Terracotta, Inc.