home *** CD-ROM | disk | FTP | other *** search
Java Source | 1999-04-09 | 1.3 KB | 61 lines |
- import java.io.*;
- import java.net.*;
- import java.util.*;
-
-
- /**
- * Class to represent a job running on the server that generally performs
- * a specific task and then terminates.
- */
- public class JDPSessionTemplate {
-
- /*
- * Jagg instance for database access.
- */
- JDPJagg jaggSQL;
- /*
- * Handle to the subsystem manager of the server.
- */
- JDPSubsystemMgr manager;
- /*
- * Handle to the job that this class is running in.
- */
- JDPJob thisJob;
- /*
- * Handle to the utilities class.
- */
- JDPUtils utils;
-
- /**
- * Creates a new module that runs on the server, performs a task or set
- * of tasks and then terminates.
- * @param manager the handle to the subsystem manager.
- * @param thisJob the handle to the job in which this class runs.
- */
- public JDPSessionTemplate (JDPSubsystemMgr manager, JDPJob thisJob) {
-
- this.manager = manager;
- this.thisJob = thisJob;
- thisJob.setInstance(this);
- jaggSQL = new JDPJagg(manager.JDPJaggPath);
- utils = new JDPUtils(null);
- utils.jaggSQL = jaggSQL;
-
- thisJob.appendJobLog("Job started on " + (new Date()).toString());
-
- try {
- //
- // Insert tasks here
- //
-
- } catch (Exception e) {
- thisJob.logException(e);
- thisJob.setJobStatus(JDPJob.INCOMPLETE);
- }
-
- thisJob.appendJobLog("Job completed on " + (new Date()).toString());
-
- }
-
- }
-