KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > daemon > DaemonEntry


1 /*
2  * Copyright 2000-2001,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.jetspeed.daemon;
18
19 /**
20 @author <a HREF="mailto:burton@apache.org">Kevin A. Burton</a>
21 @version $Id: DaemonEntry.java,v 1.4 2004/02/23 02:48:57 jford Exp $
22 */

23 public class DaemonEntry {
24     
25     private String JavaDoc name;
26     private long interval = 0;
27     private String JavaDoc classname;
28     private boolean onstartup = false;
29     private boolean hasprocessed = false;
30     private int status = Daemon.STATUS_NOT_PROCESSED;
31
32     public DaemonEntry( String JavaDoc name,
33                         long interval,
34                         String JavaDoc classname,
35                         boolean onstartup ) {
36         this.name = name;
37         this.interval = interval;
38         this.classname = classname;
39         this.onstartup = onstartup;
40
41     }
42     
43     /**
44     The "name" of this Daemon. This is the handle used within Jetspeed
45     for representation.
46     */

47     public String JavaDoc getName() { return this.name; }
48
49     /**
50     The amount of time in seconds that this daemon should wait before
51     processing again.
52     */

53     public long getInterval() { return this.interval; }
54
55     /**
56     The classname of this daemon
57     */

58     public String JavaDoc getClassname() { return this.classname; }
59
60     /**
61     Determine if this daemon should run on system startup.
62     */

63     public boolean onStartup() { return this.onstartup; }
64
65     /**
66     Return true if this daemon has processed at least once.
67
68     @author <a HREF="mailto:burton@apache.org">Kevin A. Burton</a>
69     @version $Id: DaemonEntry.java,v 1.4 2004/02/23 02:48:57 jford Exp $
70     */

71     public boolean hasProcessed() { return this.hasprocessed; }
72
73     public int getStatus() {
74         return this.status;
75     }
76     
77 }
78
Popular Tags