Back to index

nordugrid-arc-nox  1.1.0~rc6
JobState.java
Go to the documentation of this file.
00001 /* ----------------------------------------------------------------------------
00002  * This file was automatically generated by SWIG (http://www.swig.org).
00003  * Version 1.3.36
00004  *
00005  * Do not make changes to this file unless you know what you are doing--modify
00006  * the SWIG interface file instead.
00007  * ----------------------------------------------------------------------------- */
00008 
00009 package nordugrid.arc;
00010 
00011 public class JobState {
00012   private long swigCPtr;
00013   protected boolean swigCMemOwn;
00014 
00015   protected JobState(long cPtr, boolean cMemoryOwn) {
00016     swigCMemOwn = cMemoryOwn;
00017     swigCPtr = cPtr;
00018   }
00019 
00020   protected static long getCPtr(JobState obj) {
00021     return (obj == null) ? 0 : obj.swigCPtr;
00022   }
00023 
00024   public synchronized void delete() {
00025     if(swigCPtr != 0 && swigCMemOwn) {
00026       swigCMemOwn = false;
00027       throw new UnsupportedOperationException("C++ destructor does not have public access");
00028     }
00029     swigCPtr = 0;
00030   }
00031 
00032   public static SWIGTYPE_p_std__string getStateTypeString() {
00033     long cPtr = arcJNI.JobState_StateTypeString_get();
00034     return (cPtr == 0) ? null : new SWIGTYPE_p_std__string(cPtr, false);
00035   }
00036 
00037   public JobState() {
00038     this(arcJNI.new_JobState(), true);
00039   }
00040 
00041   public boolean toBool() {
00042     return arcJNI.JobState_toBool(swigCPtr, this);
00043   }
00044 
00045   public boolean IsFinished() {
00046     return arcJNI.JobState_IsFinished(swigCPtr, this);
00047   }
00048 
00049   public String GetGeneralState() {
00050     return arcJNI.JobState_GetGeneralState(swigCPtr, this);
00051   }
00052 
00053   public final static class StateType {
00054     public final static StateType UNDEFINED = new StateType("UNDEFINED");
00055     public final static StateType ACCEPTED = new StateType("ACCEPTED");
00056     public final static StateType PREPARING = new StateType("PREPARING");
00057     public final static StateType SUBMITTING = new StateType("SUBMITTING");
00058     public final static StateType HOLD = new StateType("HOLD");
00059     public final static StateType QUEUING = new StateType("QUEUING");
00060     public final static StateType RUNNING = new StateType("RUNNING");
00061     public final static StateType FINISHING = new StateType("FINISHING");
00062     public final static StateType FINISHED = new StateType("FINISHED");
00063     public final static StateType KILLED = new StateType("KILLED");
00064     public final static StateType FAILED = new StateType("FAILED");
00065     public final static StateType DELETED = new StateType("DELETED");
00066     public final static StateType OTHER = new StateType("OTHER");
00067 
00068     public final int swigValue() {
00069       return swigValue;
00070     }
00071 
00072     public String toString() {
00073       return swigName;
00074     }
00075 
00076     public static StateType swigToEnum(int swigValue) {
00077       if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
00078         return swigValues[swigValue];
00079       for (int i = 0; i < swigValues.length; i++)
00080         if (swigValues[i].swigValue == swigValue)
00081           return swigValues[i];
00082       throw new IllegalArgumentException("No enum " + StateType.class + " with value " + swigValue);
00083     }
00084 
00085     private StateType(String swigName) {
00086       this.swigName = swigName;
00087       this.swigValue = swigNext++;
00088     }
00089 
00090     private StateType(String swigName, int swigValue) {
00091       this.swigName = swigName;
00092       this.swigValue = swigValue;
00093       swigNext = swigValue+1;
00094     }
00095 
00096     private StateType(String swigName, StateType swigEnum) {
00097       this.swigName = swigName;
00098       this.swigValue = swigEnum.swigValue;
00099       swigNext = this.swigValue+1;
00100     }
00101 
00102     private static StateType[] swigValues = { UNDEFINED, ACCEPTED, PREPARING, SUBMITTING, HOLD, QUEUING, RUNNING, FINISHING, FINISHED, KILLED, FAILED, DELETED, OTHER };
00103     private static int swigNext = 0;
00104     private final int swigValue;
00105     private final String swigName;
00106   }
00107 
00108 }