001: /*
002: * Copyright 2004-2005 OpenSymphony
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
005: * use this file except in compliance with the License. You may obtain a copy
006: * of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
012: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
013: * License for the specific language governing permissions and limitations
014: * under the License.
015: *
016: */
017:
018: /*
019: * Previously Copyright (c) 2001-2004 James House
020: */
021: package org.quartz.core;
022:
023: import java.rmi.Remote;
024: import java.rmi.RemoteException;
025: import java.util.Date;
026: import java.util.List;
027: import java.util.Set;
028:
029: import org.quartz.Calendar;
030: import org.quartz.JobDataMap;
031: import org.quartz.JobDetail;
032: import org.quartz.JobListener;
033: import org.quartz.SchedulerContext;
034: import org.quartz.SchedulerException;
035: import org.quartz.SchedulerListener;
036: import org.quartz.Trigger;
037: import org.quartz.TriggerListener;
038: import org.quartz.UnableToInterruptJobException;
039:
040: /**
041: * @author James House
042: */
043: public interface RemotableQuartzScheduler extends Remote {
044:
045: /*
046: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
047: *
048: * Interface.
049: *
050: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
051: */
052:
053: String getSchedulerName() throws RemoteException;
054:
055: String getSchedulerInstanceId() throws RemoteException;
056:
057: SchedulerContext getSchedulerContext() throws SchedulerException,
058: RemoteException;
059:
060: void start() throws SchedulerException, RemoteException;
061:
062: void standby() throws RemoteException;
063:
064: boolean isInStandbyMode() throws RemoteException;
065:
066: void shutdown() throws RemoteException;
067:
068: void shutdown(boolean waitForJobsToComplete) throws RemoteException;
069:
070: boolean isShutdown() throws RemoteException;
071:
072: Date runningSince() throws RemoteException;
073:
074: String getVersion() throws RemoteException;
075:
076: int numJobsExecuted() throws RemoteException;
077:
078: Class getJobStoreClass() throws RemoteException;
079:
080: boolean supportsPersistence() throws RemoteException;
081:
082: Class getThreadPoolClass() throws RemoteException;
083:
084: int getThreadPoolSize() throws RemoteException;
085:
086: List getCurrentlyExecutingJobs() throws SchedulerException,
087: RemoteException;
088:
089: Date scheduleJob(SchedulingContext ctxt, JobDetail jobDetail,
090: Trigger trigger) throws SchedulerException, RemoteException;
091:
092: Date scheduleJob(SchedulingContext ctxt, Trigger trigger)
093: throws SchedulerException, RemoteException;
094:
095: void addJob(SchedulingContext ctxt, JobDetail jobDetail,
096: boolean replace) throws SchedulerException, RemoteException;
097:
098: boolean deleteJob(SchedulingContext ctxt, String jobName,
099: String groupName) throws SchedulerException,
100: RemoteException;
101:
102: boolean unscheduleJob(SchedulingContext ctxt, String triggerName,
103: String groupName) throws SchedulerException,
104: RemoteException;
105:
106: Date rescheduleJob(SchedulingContext ctxt, String triggerName,
107: String groupName, Trigger newTrigger)
108: throws SchedulerException, RemoteException;
109:
110: void triggerJob(SchedulingContext ctxt, String jobName,
111: String groupName, JobDataMap data)
112: throws SchedulerException, RemoteException;
113:
114: void triggerJobWithVolatileTrigger(SchedulingContext ctxt,
115: String jobName, String groupName, JobDataMap data)
116: throws SchedulerException, RemoteException;
117:
118: void pauseTrigger(SchedulingContext ctxt, String triggerName,
119: String groupName) throws SchedulerException,
120: RemoteException;
121:
122: void pauseTriggerGroup(SchedulingContext ctxt, String groupName)
123: throws SchedulerException, RemoteException;
124:
125: void pauseJob(SchedulingContext ctxt, String jobName,
126: String groupName) throws SchedulerException,
127: RemoteException;
128:
129: void pauseJobGroup(SchedulingContext ctxt, String groupName)
130: throws SchedulerException, RemoteException;
131:
132: void resumeTrigger(SchedulingContext ctxt, String triggerName,
133: String groupName) throws SchedulerException,
134: RemoteException;
135:
136: void resumeTriggerGroup(SchedulingContext ctxt, String groupName)
137: throws SchedulerException, RemoteException;
138:
139: Set getPausedTriggerGroups(SchedulingContext ctxt)
140: throws SchedulerException, RemoteException;
141:
142: void resumeJob(SchedulingContext ctxt, String jobName,
143: String groupName) throws SchedulerException,
144: RemoteException;
145:
146: void resumeJobGroup(SchedulingContext ctxt, String groupName)
147: throws SchedulerException, RemoteException;
148:
149: void pauseAll(SchedulingContext ctxt) throws SchedulerException,
150: RemoteException;
151:
152: void resumeAll(SchedulingContext ctxt) throws SchedulerException,
153: RemoteException;
154:
155: String[] getJobGroupNames(SchedulingContext ctxt)
156: throws SchedulerException, RemoteException;
157:
158: String[] getJobNames(SchedulingContext ctxt, String groupName)
159: throws SchedulerException, RemoteException;
160:
161: Trigger[] getTriggersOfJob(SchedulingContext ctxt, String jobName,
162: String groupName) throws SchedulerException,
163: RemoteException;
164:
165: String[] getTriggerGroupNames(SchedulingContext ctxt)
166: throws SchedulerException, RemoteException;
167:
168: String[] getTriggerNames(SchedulingContext ctxt, String groupName)
169: throws SchedulerException, RemoteException;
170:
171: JobDetail getJobDetail(SchedulingContext ctxt, String jobName,
172: String jobGroup) throws SchedulerException, RemoteException;
173:
174: Trigger getTrigger(SchedulingContext ctxt, String triggerName,
175: String triggerGroup) throws SchedulerException,
176: RemoteException;
177:
178: int getTriggerState(SchedulingContext ctxt, String triggerName,
179: String triggerGroup) throws SchedulerException,
180: RemoteException;
181:
182: void addCalendar(SchedulingContext ctxt, String calName,
183: Calendar calendar, boolean replace, boolean updateTriggers)
184: throws SchedulerException, RemoteException;
185:
186: boolean deleteCalendar(SchedulingContext ctxt, String calName)
187: throws SchedulerException, RemoteException;
188:
189: Calendar getCalendar(SchedulingContext ctxt, String calName)
190: throws SchedulerException, RemoteException;
191:
192: String[] getCalendarNames(SchedulingContext ctxt)
193: throws SchedulerException, RemoteException;
194:
195: void addGlobalJobListener(JobListener jobListener)
196: throws RemoteException;
197:
198: void addJobListener(JobListener jobListener) throws RemoteException;
199:
200: boolean removeGlobalJobListener(String name) throws RemoteException;
201:
202: boolean removeJobListener(String name) throws RemoteException;
203:
204: List getGlobalJobListeners() throws RemoteException;
205:
206: Set getJobListenerNames() throws RemoteException;
207:
208: JobListener getGlobalJobListener(String name)
209: throws RemoteException;
210:
211: JobListener getJobListener(String name) throws RemoteException;
212:
213: void addGlobalTriggerListener(TriggerListener triggerListener)
214: throws RemoteException;
215:
216: void addTriggerListener(TriggerListener triggerListener)
217: throws RemoteException;
218:
219: boolean removeGlobalTriggerListener(String name)
220: throws RemoteException;
221:
222: boolean removeTriggerListener(String name) throws RemoteException;
223:
224: List getGlobalTriggerListeners() throws RemoteException;
225:
226: Set getTriggerListenerNames() throws RemoteException;
227:
228: TriggerListener getGlobalTriggerListener(String name)
229: throws RemoteException;
230:
231: TriggerListener getTriggerListener(String name)
232: throws RemoteException;
233:
234: void addSchedulerListener(SchedulerListener schedulerListener)
235: throws RemoteException;
236:
237: boolean removeSchedulerListener(SchedulerListener schedulerListener)
238: throws RemoteException;
239:
240: List getSchedulerListeners() throws RemoteException;
241:
242: boolean interrupt(SchedulingContext ctxt, String jobName,
243: String groupName) throws UnableToInterruptJobException,
244: RemoteException;
245: }
|