1. opensymphony
  2. quartz

Commits

jhouse  committed dc0fbce

repackage ListenerSupport classes.

git-svn-id: http://svn.opensymphony.com/svn/quartz/trunk@62969f7d36a-ea1c-0410-88ea-9fd03e4c9665

  • Participants
  • Parent commits de5ce59
  • Branches master

Comments (0)

Files changed (8)

File src/java/org/quartz/JobListenerSupport.java

  • Ignore whitespace
-/* 
- * Copyright 2004-2006 OpenSymphony 
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not 
- * use this file except in compliance with the License. You may obtain a copy 
- * of the License at 
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0 
- *   
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 
- * License for the specific language governing permissions and limitations 
- * under the License.
- */
-package org.quartz;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * A helpful abstract base class for implementors of 
- * <code>{@link org.quartz.JobListener}</code>
- * 
- * <p>
- * The methods in this class are empty so you only need to override the  
- * subset for the <code>{@link org.quartz.JobListener}</code> events
- * you care about.
- * </p>
- * 
- * <p>
- * You are required to implement <code>{@link org.quartz.JobListener#getName()}</code> 
- * to return the unique name of your <code>JobListener</code>.  
- * </p>
- * 
- * @see JobListener
- */
-public abstract class JobListenerSupport implements JobListener {
-    private final Log log = LogFactory.getLog(getClass());
-
-    /**
-     * Get the <code>{@link org.apache.commons.logging.Log}</code> for this
-     * class's category.  This should be used by subclasses for logging.
-     */
-    protected Log getLog() {
-        return log;
-    }
-
-    public void jobToBeExecuted(JobExecutionContext context) {
-    }
-
-    public void jobExecutionVetoed(JobExecutionContext context) {
-    }
-
-    public void jobWasExecuted(JobExecutionContext context, JobExecutionException jobException) {
-    }
-}

File src/java/org/quartz/SchedulerListenerSupport.java

  • Ignore whitespace
-/* 
- * Copyright 2004-2006 OpenSymphony 
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not 
- * use this file except in compliance with the License. You may obtain a copy 
- * of the License at 
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0 
- *   
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 
- * License for the specific language governing permissions and limitations 
- * under the License.
- */
-package org.quartz;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * A helpful abstract base class for implementors of 
- * <code>{@link org.quartz.SchedulerListener}</code>
- * 
- * <p>
- * The methods in this class are empty so you only need to override the  
- * subset for the <code>{@link org.quartz.SchedulerListener}</code> events
- * you care about.
- * </p>
- * 
- * @see SchedulerListener
- * @see org.quartz.impl.QuartzServer
- */
-public abstract class SchedulerListenerSupport implements SchedulerListener {
-    private final Log log = LogFactory.getLog(getClass());
-
-    /**
-     * Get the <code>{@link org.apache.commons.logging.Log}</code> for this
-     * class's category.  This should be used by subclasses for logging.
-     */
-    protected Log getLog() {
-        return log;
-    }
-
-    public void jobScheduled(Trigger trigger) {
-    }
-
-    public void jobUnscheduled(String triggerName, String triggerGroup) {
-    }
-
-    public void triggerFinalized(Trigger trigger) {
-    }
-
-    public void triggersPaused(String triggerName, String triggerGroup) {
-    }
-
-    public void triggersResumed(String triggerName, String triggerGroup) {
-    }
-
-    public void jobsPaused(String jobName, String jobGroup) {
-    }
-
-    public void jobsResumed(String jobName, String jobGroup) {
-    }
-
-    public void schedulerError(String msg, SchedulerException cause) {
-    }
-
-    public void schedulerShutdown() {
-    }
-}

File src/java/org/quartz/TriggerListenerSupport.java

  • Ignore whitespace
-/* 
- * Copyright 2004-2006 OpenSymphony 
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not 
- * use this file except in compliance with the License. You may obtain a copy 
- * of the License at 
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0 
- *   
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 
- * License for the specific language governing permissions and limitations 
- * under the License.
- */
-package org.quartz;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * A helpful abstract base class for implementors of 
- * <code>{@link org.quartz.TriggerListener}</code>
- * 
- * <p>
- * The methods in this class are empty so you only need to override the  
- * subset for the <code>{@link org.quartz.TriggerListener}</code> events
- * you care about.
- * </p>
- * 
- * <p>
- * You are required to implement <code>{@link org.quartz.TriggerListener#getName()}</code> 
- * to return the unique name of your <code>TriggerListener</code>.  
- * </p>
- * 
- * @see TriggerListener
- */
-public abstract class TriggerListenerSupport implements TriggerListener {
-    private final Log log = LogFactory.getLog(getClass());
-
-    /**
-     * Get the <code>{@link org.apache.commons.logging.Log}</code> for this
-     * class's category.  This should be used by subclasses for logging.
-     */
-    protected Log getLog() {
-        return log;
-    }
-    
-    public void triggerFired(Trigger trigger, JobExecutionContext context) {
-    }
-
-    public boolean vetoJobExecution(Trigger trigger, JobExecutionContext context) {
-        return false;
-    }
-
-    public void triggerMisfired(Trigger trigger) {
-    }
-
-    public void triggerComplete(
-        Trigger trigger,
-        JobExecutionContext context,
-        int triggerInstructionCode) {
-    }
-}

File src/java/org/quartz/core/QuartzScheduler.java

View file
  • Ignore whitespace
 import org.quartz.SchedulerContext;
 import org.quartz.SchedulerException;
 import org.quartz.SchedulerListener;
-import org.quartz.SchedulerListenerSupport;
+import org.quartz.listeners.SchedulerListenerSupport;
 import org.quartz.Trigger;
 import org.quartz.TriggerListener;
 import org.quartz.UnableToInterruptJobException;

File src/java/org/quartz/impl/QuartzServer.java

View file
  • Ignore whitespace
 import org.quartz.Scheduler;
 import org.quartz.SchedulerException;
 import org.quartz.SchedulerFactory;
-import org.quartz.SchedulerListenerSupport;
+import org.quartz.listeners.SchedulerListenerSupport;
 
 /**
  * <p>
  * Instantiates an instance of Quartz Scheduler as a stand-alone program, if
  * the scheduler is configured for RMI it will be made available.
  * </p>
- * 
+ *
  * <p>
  * The main() method of this class currently accepts 0 or 1 arguemtns, if there
  * is an argument, and its value is <code>"console"</code>, then the program
  * will print a short message on the console (std-out) and wait for the user to
  * type "exit" - at which time the scheduler will be shutdown.
  * </p>
- * 
+ *
  * <p>
  * Future versions of this server should allow additional configuration for
  * responding to scheduler events by allowing the user to specify <code>{@link org.quartz.JobListener}</code>,
  * <code>{@link org.quartz.TriggerListener}</code> and <code>{@link org.quartz.SchedulerListener}</code>
  * classes.
  * </p>
- * 
+ *
  * <p>
  * Please read the Quartz FAQ entries about RMI before asking questions in the
  * forums or mail-lists.
  * </p>
- * 
+ *
  * @author James House
  */
 public class QuartzServer extends SchedulerListenerSupport {
 
     /*
      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-     * 
+     *
      * Data members.
-     * 
+     *
      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      */
 
 
     /*
      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-     * 
+     *
      * Constructors.
-     * 
+     *
      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      */
 
 
     /*
      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-     * 
+     *
      * Interface.
-     * 
+     *
      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      */
 
 
     /*
      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-     * 
+     *
      * SchedulerListener Interface.
-     * 
+     *
      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      */
 
      * or the inability to instantiate a <code>Job</code> instance when its
      * <code>Trigger</code> has fired.
      * </p>
-     * 
+     *
      * <p>
      * The <code>getErrorCode()</code> method of the given SchedulerException
      * can be used to determine more specific information about the type of
 
     /*
      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-     * 
+     *
      * Main Method.
-     * 
+     *
      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      */
 
 
         try {
             QuartzServer server = new QuartzServer();
-            if (args.length == 0) { 
+            if (args.length == 0) {
                 server.serve(
                     new org.quartz.impl.StdSchedulerFactory(), false);
-            } else if (args.length == 1 && args[0].equalsIgnoreCase("console")) { 
+            } else if (args.length == 1 && args[0].equalsIgnoreCase("console")) {
                 server.serve(new org.quartz.impl.StdSchedulerFactory(), true);
             } else {
                 System.err.println("\nUsage: QuartzServer [console]");

File src/java/org/quartz/listeners/JobListenerSupport.java

View file
  • Ignore whitespace
+/* 
+ * Copyright 2004-2006 OpenSymphony 
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not 
+ * use this file except in compliance with the License. You may obtain a copy 
+ * of the License at 
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0 
+ *   
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 
+ * License for the specific language governing permissions and limitations 
+ * under the License.
+ */
+package org.quartz.listeners;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.quartz.JobListener;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
+
+/**
+ * A helpful abstract base class for implementors of 
+ * <code>{@link org.quartz.JobListener}</code>
+ * 
+ * <p>
+ * The methods in this class are empty so you only need to override the  
+ * subset for the <code>{@link org.quartz.JobListener}</code> events
+ * you care about.
+ * </p>
+ * 
+ * <p>
+ * You are required to implement <code>{@link org.quartz.JobListener#getName()}</code> 
+ * to return the unique name of your <code>JobListener</code>.  
+ * </p>
+ * 
+ * @see org.quartz.JobListener
+ */
+public abstract class JobListenerSupport implements JobListener {
+    private final Log log = LogFactory.getLog(getClass());
+
+    /**
+     * Get the <code>{@link org.apache.commons.logging.Log}</code> for this
+     * class's category.  This should be used by subclasses for logging.
+     */
+    protected Log getLog() {
+        return log;
+    }
+
+    public void jobToBeExecuted(JobExecutionContext context) {
+    }
+
+    public void jobExecutionVetoed(JobExecutionContext context) {
+    }
+
+    public void jobWasExecuted(JobExecutionContext context, JobExecutionException jobException) {
+    }
+}

File src/java/org/quartz/listeners/SchedulerListenerSupport.java

View file
  • Ignore whitespace
+/* 
+ * Copyright 2004-2006 OpenSymphony 
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not 
+ * use this file except in compliance with the License. You may obtain a copy 
+ * of the License at 
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0 
+ *   
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 
+ * License for the specific language governing permissions and limitations 
+ * under the License.
+ */
+package org.quartz.listeners;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.quartz.SchedulerListener;
+import org.quartz.Trigger;
+import org.quartz.SchedulerException;
+
+/**
+ * A helpful abstract base class for implementors of 
+ * <code>{@link org.quartz.SchedulerListener}</code>
+ * 
+ * <p>
+ * The methods in this class are empty so you only need to override the  
+ * subset for the <code>{@link org.quartz.SchedulerListener}</code> events
+ * you care about.
+ * </p>
+ * 
+ * @see org.quartz.SchedulerListener
+ * @see org.quartz.impl.QuartzServer
+ */
+public abstract class SchedulerListenerSupport implements SchedulerListener {
+    private final Log log = LogFactory.getLog(getClass());
+
+    /**
+     * Get the <code>{@link org.apache.commons.logging.Log}</code> for this
+     * class's category.  This should be used by subclasses for logging.
+     */
+    protected Log getLog() {
+        return log;
+    }
+
+    public void jobScheduled(Trigger trigger) {
+    }
+
+    public void jobUnscheduled(String triggerName, String triggerGroup) {
+    }
+
+    public void triggerFinalized(Trigger trigger) {
+    }
+
+    public void triggersPaused(String triggerName, String triggerGroup) {
+    }
+
+    public void triggersResumed(String triggerName, String triggerGroup) {
+    }
+
+    public void jobsPaused(String jobName, String jobGroup) {
+    }
+
+    public void jobsResumed(String jobName, String jobGroup) {
+    }
+
+    public void schedulerError(String msg, SchedulerException cause) {
+    }
+
+    public void schedulerShutdown() {
+    }
+}

File src/java/org/quartz/listeners/TriggerListenerSupport.java

View file
  • Ignore whitespace
+/* 
+ * Copyright 2004-2006 OpenSymphony 
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not 
+ * use this file except in compliance with the License. You may obtain a copy 
+ * of the License at 
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0 
+ *   
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 
+ * License for the specific language governing permissions and limitations 
+ * under the License.
+ */
+package org.quartz.listeners;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.quartz.TriggerListener;
+import org.quartz.Trigger;
+import org.quartz.JobExecutionContext;
+
+/**
+ * A helpful abstract base class for implementors of 
+ * <code>{@link org.quartz.TriggerListener}</code>
+ * 
+ * <p>
+ * The methods in this class are empty so you only need to override the  
+ * subset for the <code>{@link org.quartz.TriggerListener}</code> events
+ * you care about.
+ * </p>
+ * 
+ * <p>
+ * You are required to implement <code>{@link org.quartz.TriggerListener#getName()}</code> 
+ * to return the unique name of your <code>TriggerListener</code>.  
+ * </p>
+ * 
+ * @see org.quartz.TriggerListener
+ */
+public abstract class TriggerListenerSupport implements TriggerListener {
+    private final Log log = LogFactory.getLog(getClass());
+
+    /**
+     * Get the <code>{@link org.apache.commons.logging.Log}</code> for this
+     * class's category.  This should be used by subclasses for logging.
+     */
+    protected Log getLog() {
+        return log;
+    }
+
+    public void triggerFired(Trigger trigger, JobExecutionContext context) {
+    }
+
+    public boolean vetoJobExecution(Trigger trigger, JobExecutionContext context) {
+        return false;
+    }
+
+    public void triggerMisfired(Trigger trigger) {
+    }
+
+    public void triggerComplete(
+        Trigger trigger,
+        JobExecutionContext context,
+        int triggerInstructionCode) {
+    }
+}