KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sape > carbon > services > scheduler > SchedulerServiceConfiguration


1 /*
2  * The contents of this file are subject to the Sapient Public License
3  * Version 1.0 (the "License"); you may not use this file except in compliance
4  * with the License. You may obtain a copy of the License at
5  * http://carbon.sf.net/License.html.
6  *
7  * Software distributed under the License is distributed on an "AS IS" basis,
8  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
9  * the specific language governing rights and limitations under the License.
10  *
11  * The Original Code is The Carbon Component Framework.
12  *
13  * The Initial Developer of the Original Code is Sapient Corporation
14  *
15  * Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
16  */

17
18 package org.sape.carbon.services.scheduler;
19
20 import org.sape.carbon.core.component.ComponentConfiguration;
21
22 import org.sape.carbon.services.threadpool.ThreadPool;
23
24 /**
25  * Configuration interface for the SchedulerService. The configuration
26  * consists of 2 attributes: an array of fixed rate tasks and an array
27  * of fixed delay tasks. Fixed rate tasks are defined by the configuration
28  * interface FixedRateTaskConfiguration. Fixed delay tasks are defined by
29  * the configuration interface FixedDelayTaskConfiguration.
30  *
31  * @see org.sape.carbon.services.scheduler.FixedRateTaskConfiguration
32  * @see org.sape.carbon.services.scheduler.FixedDelayTaskConfiguration
33  *
34  * Copyright 2002 Sapient
35  * @since carbon 1.0
36  * @author Douglas Voet, June 2002
37  * @version $Revision: 1.9 $($Author: dvoet $ / $Date: 2003/11/20 21:46:15 $)
38  */

39 public interface SchedulerServiceConfiguration
40     extends ComponentConfiguration {
41
42     /**
43      * Gets the FixedRateTasks associated with this scheduler.
44      *
45      * @return FixedRateTasks associated with this scheduler
46      */

47     FixedRateTaskConfiguration[] getFixedRateTask();
48
49     /**
50      * Sets the FixedRateTasks associated with this scheduler.
51      *
52      * @param tasks FixedRateTasks associated with this scheduler
53      */

54     void setFixedRateTask(FixedRateTaskConfiguration[] tasks);
55
56     /**
57      * Adds a FixedRateTask to this scheduler.
58      *
59      * @param task FixedRateTasks to associate with this scheduler
60      */

61     void addFixedRateTask(FixedRateTaskConfiguration task);
62
63     /**
64      * Gets the FixedDelayTaskConfiguration associated with this scheduler.
65      *
66      * @return FixedDelayTaskConfiguration associated with this scheduler
67      */

68     FixedDelayTaskConfiguration[] getFixedDelayTask();
69
70     /**
71      * Sets the FixedDelayTaskConfiguration associated with this scheduler.
72      *
73      * @param tasks FixedDelayTaskConfiguration associated with this
74      * scheduler
75      */

76     void setFixedDelayTask(FixedDelayTaskConfiguration[] tasks);
77
78     /**
79      * Adds a FixedDelayTaskConfiguration to this scheduler.
80      *
81      * @param task FixedDelayTaskConfiguration to associate with this scheduler
82      */

83     void addFixedDelayTask(FixedDelayTaskConfiguration task);
84     
85     ThreadPool getThreadPool();
86     void setThreadPool(ThreadPool threadPool);
87 }
88
Popular Tags