01: /*
02: * Copyright 2004-2005 OpenSymphony
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
05: * use this file except in compliance with the License. You may obtain a copy
06: * of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13: * License for the specific language governing permissions and limitations
14: * under the License.
15: *
16: */
17:
18: /*
19: * Previously Copyright (c) 2001-2004 James House
20: */
21: package org.quartz;
22:
23: import java.util.Collection;
24:
25: /**
26: * <p>
27: * Provides a mechanism for obtaining client-usable handles to <code>Scheduler</code>
28: * instances.
29: * </p>
30: *
31: * @see Scheduler
32: * @see org.quartz.impl.StdSchedulerFactory
33: *
34: * @author James House
35: */
36: public interface SchedulerFactory {
37:
38: /*
39: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40: *
41: * Interface.
42: *
43: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44: */
45:
46: /**
47: * <p>
48: * Returns a client-usable handle to a <code>Scheduler</code>.
49: * </p>
50: *
51: * @throws SchedulerException
52: * if there is a problem with the underlying <code>Scheduler</code>.
53: */
54: Scheduler getScheduler() throws SchedulerException;
55:
56: /**
57: * <p>
58: * Returns a handle to the Scheduler with the given name, if it exists.
59: * </p>
60: */
61: Scheduler getScheduler(String schedName) throws SchedulerException;
62:
63: /**
64: * <p>
65: * Returns handles to all known Schedulers (made by any SchedulerFactory
66: * within this jvm.).
67: * </p>
68: */
69: Collection getAllSchedulers() throws SchedulerException;
70:
71: }
|