KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ejbca > core > model > services > IInterval


1 /*************************************************************************
2  * *
3  * EJBCA: The OpenSource Certificate Authority *
4  * *
5  * This software is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU Lesser General Public *
7  * License as published by the Free Software Foundation; either *
8  * version 2.1 of the License, or any later version. *
9  * *
10  * See terms of license at gnu.org. *
11  * *
12  *************************************************************************/

13 package org.ejbca.core.model.services;
14
15 import java.util.Properties JavaDoc;
16
17 /**
18  * Class representing an interval to when the service should run next time
19  *
20  * It's man method is getTimeToExecution
21  *
22  * @author Philip Vendil 2006 sep 27
23  *
24  * @version $Id: IInterval.java,v 1.2 2006/10/01 17:46:25 herrvendil Exp $
25  */

26 public interface IInterval {
27     
28     /**
29      * Constant indicating if the service should stop executing
30      */

31     public static final long DONT_EXECUTE = -1;
32     
33     /**
34      * Method that should initialize the interval according to the
35      * configured properties.
36      *
37      * This method should be called before the any action calls are made.
38      */

39     public void init(Properties JavaDoc properties, String JavaDoc serviceName);
40     
41     /**
42      * @return the time in seconds to next execution or DONT_EXECUTE if the
43      * service should run anymore
44      */

45     public long getTimeToExecution();
46
47 }
48
Popular Tags