View Javadoc

1   package com.explosion.utilities.process.threads;
2   
3   
4   /*
5    * =============================================================================
6    * 
7    * Copyright 2004 Stephen Cowx
8    * 
9    * Licensed under the Apache License, Version 2.0 (the "License"); you may not
10   * use this file except in compliance with the License. You may obtain a copy of
11   * the License at
12   * 
13   * http://www.apache.org/licenses/LICENSE-2.0
14   * 
15   * Unless required by applicable law or agreed to in writing, software
16   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
18   * License for the specific language governing permissions and limitations under
19   * the License.
20   * 
21   * =============================================================================
22   */
23  
24  /***
25   * @author Stephen Cowx Date created:@14-Feb-2003
26   * 
27   */
28  public interface Process
29  {
30  
31      /***
32       * Returns the percentage of completion status of this job
33       */
34      public int getPercentComplete();
35  
36      /***
37       * sets the percentage of completion status of this job
38       */
39      public void setPercentComplete(int percentComplete);
40  
41      /***
42       * Returns a string value indicating what is currently occuring in this
43       * process.
44       */
45      public String getStatusText();
46  
47      /***
48       * Sets the value ofthestatusText for this process.
49       */
50      public void setStatusText(String statusText);
51  
52      /***
53       * Returns the value of the ProcessThread running this Process
54       */
55      public ProcessThread getProcessControl();
56  
57      /***
58       * Sets the value of the ProcessThread running this Process
59       */
60      public void setProcessControl(ProcessThread processThread);
61  
62      public boolean isStopped();
63  
64      /***
65       * Returns a boolean value indicating whther this is a user process or not
66       * @return
67       */
68      public boolean isUserProcess();
69      
70      /***
71       * Sets whtether or not this is a user process.  True means that it is
72       * @param truth
73       */
74      public void setIsUserProcess(boolean truth);     
75      
76  }