Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

pinc.scheduler
Class Job  view Job download Job.java

java.lang.Object
  extended bypinc.scheduler.Job
All Implemented Interfaces:
IJob

public class Job
extends java.lang.Object
implements IJob

Title: Pinc

Description: Klasse verwaltet einen einzelnen Job. Hier werden alle

Copyright: Copyright (c) 2003

Company: dn03

Version:
1.0

Field Summary
private  java.lang.String command
           
private  boolean[] day
           
private  javax.xml.parsers.DocumentBuilderFactory dbf
           
private  byte deadLineAction
           
private  org.w3c.dom.Document doc
           
private  long executionTime
           
private  boolean[] hour
           
static byte INDIPENDENT
           
private  java.util.Hashtable jobDependence
           
static byte KILL
           
private  java.lang.String mailTo
           
private  int maxJobs
           
private  boolean[] minute
           
private  boolean[] month
           
static byte MUST_NOT_RUN
           
static byte MUST_RUN
           
private  int number
           
private  java.lang.String parameter
           
private  java.lang.Process pid
           
private  java.util.Vector startJobs
           
private  java.util.Date startTime
           
static byte WAIT_UNITL_OTHER_PROCESS
           
static byte WAIT_UNTIL_NEXT_INTERVALL
           
private  boolean[] weekday
           
 
Constructor Summary
Job(Job j)
           
Job(org.w3c.dom.Node n)
          Dieser Constructor initialisiert ein Job Objekt aus einem XML String.
Job(java.lang.String Command, java.util.Date Starttime, boolean[] _Minute, boolean[] _Hour, boolean[] _Day, boolean[] _Weekday, boolean[] _Month, java.util.Hashtable JobDependence, long ExecutionsTime, byte DeadLineAction, int MaxJobs, java.lang.String MailTo)
          Constructor initialliesiert ein neues Job Objekt.
 
Method Summary
 void addIntervall()
          Erhöht die Startzeit um das angegebene Intervall.
 void addJobDependence(int VectorNr, byte Running)
          Diese Methode fügt einen Job in die Dependence Tabelle ein.
 void addParameter(java.lang.String Parameter)
           
 void addStartJob(int VectorNr)
          Fügt eine Nummer zum Array hinzu.
 java.lang.String getCommand()
           
 Job getCopy()
           
 boolean[] getDayIntervall()
           
 byte getDeadLineAction()
           
 int[] getDependentJobs()
           
 long getExecutionTime()
           
 boolean[] getHourIntervall()
           
 java.util.Hashtable getJobDependence()
           
 byte getJobDependence(int VectorNr)
           
 java.lang.String getMailTo()
           
 int getMaxJobs()
           
 boolean[] getMinuteIntervall()
           
 boolean[] getMonthIntervall()
           
 int getNumber()
           
 java.lang.String getParameter()
           
 java.lang.Process getPid()
           
 int[] getStartJobs()
           
 java.util.Date getStartTime()
           
 boolean[] getWeekDayIntervall()
           
 void setCommand(java.lang.String Command)
           
 void setDeadLineAction(byte Action)
           
 void setExcecutionTime(long ExcecutionTime)
           
 void setIntervall(boolean[] _Minute, boolean[] _Hour, boolean[] _Day, boolean[] _Weekday, boolean[] _Month)
           
 void setMailTo(java.lang.String MailAddress)
           
 void setMaxJobs(int MaxJobs)
           
 void setPid(java.lang.Process Pid)
           
 void setProcessNumber(int Number)
           
 void setStartTime(java.util.Date StartTime)
           
 org.w3c.dom.Node toXML(org.w3c.dom.Document doc)
          Diese Methode formt die Eigenschaften der Klasse in einen Xml- String um.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

command

private java.lang.String command

pid

private java.lang.Process pid

startTime

private java.util.Date startTime

executionTime

private long executionTime

deadLineAction

private byte deadLineAction

maxJobs

private int maxJobs

jobDependence

private java.util.Hashtable jobDependence

startJobs

private java.util.Vector startJobs

mailTo

private java.lang.String mailTo

number

private int number

dbf

private javax.xml.parsers.DocumentBuilderFactory dbf

doc

private org.w3c.dom.Document doc

parameter

private java.lang.String parameter

minute

private boolean[] minute

hour

private boolean[] hour

day

private boolean[] day

weekday

private boolean[] weekday

month

private boolean[] month

KILL

public static final byte KILL
See Also:
Constant Field Values

WAIT_UNTIL_NEXT_INTERVALL

public static final byte WAIT_UNTIL_NEXT_INTERVALL
See Also:
Constant Field Values

WAIT_UNITL_OTHER_PROCESS

public static final byte WAIT_UNITL_OTHER_PROCESS
See Also:
Constant Field Values

INDIPENDENT

public static final byte INDIPENDENT
See Also:
Constant Field Values

MUST_RUN

public static final byte MUST_RUN
See Also:
Constant Field Values

MUST_NOT_RUN

public static final byte MUST_NOT_RUN
See Also:
Constant Field Values
Constructor Detail

Job

public Job(org.w3c.dom.Node n)
    throws pinc.PincException
Dieser Constructor initialisiert ein Job Objekt aus einem XML String.


Job

public Job(java.lang.String Command,
           java.util.Date Starttime,
           boolean[] _Minute,
           boolean[] _Hour,
           boolean[] _Day,
           boolean[] _Weekday,
           boolean[] _Month,
           java.util.Hashtable JobDependence,
           long ExecutionsTime,
           byte DeadLineAction,
           int MaxJobs,
           java.lang.String MailTo)
    throws pinc.PincException
Constructor initialliesiert ein neues Job Objekt.


Job

public Job(Job j)
    throws pinc.PincException
Method Detail

getJobDependence

public java.util.Hashtable getJobDependence()

setMailTo

public void setMailTo(java.lang.String MailAddress)

setProcessNumber

public void setProcessNumber(int Number)

getNumber

public int getNumber()
Specified by:
getNumber in interface IJob

getMailTo

public java.lang.String getMailTo()
Specified by:
getMailTo in interface IJob

setCommand

public void setCommand(java.lang.String Command)

getCommand

public java.lang.String getCommand()
Specified by:
getCommand in interface IJob

setPid

public void setPid(java.lang.Process Pid)

getPid

public java.lang.Process getPid()

setStartTime

public void setStartTime(java.util.Date StartTime)

getStartTime

public java.util.Date getStartTime()
Specified by:
getStartTime in interface IJob

setIntervall

public void setIntervall(boolean[] _Minute,
                         boolean[] _Hour,
                         boolean[] _Day,
                         boolean[] _Weekday,
                         boolean[] _Month)
                  throws pinc.PincException

getMinuteIntervall

public boolean[] getMinuteIntervall()
Specified by:
getMinuteIntervall in interface IJob

getHourIntervall

public boolean[] getHourIntervall()
Specified by:
getHourIntervall in interface IJob

getDayIntervall

public boolean[] getDayIntervall()
Specified by:
getDayIntervall in interface IJob

getWeekDayIntervall

public boolean[] getWeekDayIntervall()
Specified by:
getWeekDayIntervall in interface IJob

getMonthIntervall

public boolean[] getMonthIntervall()
Specified by:
getMonthIntervall in interface IJob

setExcecutionTime

public void setExcecutionTime(long ExcecutionTime)

getExecutionTime

public long getExecutionTime()
Specified by:
getExecutionTime in interface IJob

setDeadLineAction

public void setDeadLineAction(byte Action)
                       throws pinc.PincException

getDeadLineAction

public byte getDeadLineAction()
Specified by:
getDeadLineAction in interface IJob

setMaxJobs

public void setMaxJobs(int MaxJobs)

getMaxJobs

public int getMaxJobs()
Specified by:
getMaxJobs in interface IJob

getCopy

public Job getCopy()
            throws pinc.PincException

addJobDependence

public void addJobDependence(int VectorNr,
                             byte Running)
                      throws pinc.PincException
Diese Methode fügt einen Job in die Dependence Tabelle ein. Das flag Running bedeutet bei true, das der Job mit der gewählten Nummer bei der Ausführung dieses Jobs laufen muss false bedeutet das der Job nicht laufen darf


getJobDependence

public byte getJobDependence(int VectorNr)
Specified by:
getJobDependence in interface IJob

getDependentJobs

public int[] getDependentJobs()
Specified by:
getDependentJobs in interface IJob

getStartJobs

public int[] getStartJobs()

toXML

public org.w3c.dom.Node toXML(org.w3c.dom.Document doc)
                       throws pinc.PincException
Diese Methode formt die Eigenschaften der Klasse in einen Xml- String um.


addIntervall

public void addIntervall()
Erhöht die Startzeit um das angegebene Intervall.


addStartJob

public void addStartJob(int VectorNr)
Fügt eine Nummer zum Array hinzu.


addParameter

public void addParameter(java.lang.String Parameter)

getParameter

public java.lang.String getParameter()