- Timestamp:
- 2003-05-27T15:40:47+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/shell/GShellEvent.java
r4293 r4364 54 54 /** This class encapsulates all the information created by an event within a <strong>GShell</strong> process. */ 55 55 public class GShellEvent 56 57 58 59 60 61 62 63 64 65 66 67 68 56 extends AWTEvent { 57 /** The status of the process at the completion of event. */ 58 private int status = -1; 59 /** The process type (such as COPY, BUILD or IMPORT). */ 60 private int type = -1; 61 /** Any message associated with this event. */ 62 private String message = null; 63 /* Constructor. 64 * @param source The <strong>GShell</strong> that fired this message. 65 * @param id The event identifier as an <strong>int</strong>. 66 * @param type The process type as an <strong>int</strong>. 67 * @param message A <strong>String</strong> representing any message attatched with this event. 68 * @param status The status of the process post event, as an <strong>int</strong>. 69 69 */ 70 71 72 73 74 75 76 77 70 public GShellEvent(Object source, int id, int type, String message, 71 int status) { 72 super(source, id); 73 this.message = message; 74 this.status = status; 75 this.type = type; 76 } 77 /** Gets the message associated with this event. 78 78 * @return The message as a <strong>String</strong> or <i>null</i>. 79 79 */ 80 81 82 83 80 public String getMessage() { 81 return message; 82 } 83 /** Gets the status associated with this event. This status can then be matched back to the constants in <strong>GShell</strong>. 84 84 * @return An <strong>int</strong> signifying the process status. 85 85 */ 86 87 88 89 86 public int getStatus() { 87 return status; 88 } 89 /** Gets the type associated with this event. This type can then be matched back to the constants in <strong>GShell</strong>. 90 90 * @return An <strong>int</strong> signifying the process type. 91 91 */ 92 93 94 92 public int getType() { 93 return type; 94 } 95 95 96 97 98 96 public String toString() { 97 return "org.greenstone.gatherer.shell.GShellEvent[" + message + "," + status + "," + type + "]"; 98 } 99 99 }
Note:
See TracChangeset
for help on using the changeset viewer.