1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.kernel.scheduler;
16  
17  import com.liferay.portal.kernel.messaging.Message;
18  import com.liferay.portal.kernel.scheduler.messaging.SchedulerRequest;
19  
20  import java.util.List;
21  
22  /**
23   * <a href="SchedulerEngine.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Michael C. Han
26   * @author Bruno Farache
27   * @author Shuyang Zhou
28   */
29  public interface SchedulerEngine {
30  
31      public static final String DESCRIPTION = "description";
32  
33      public static final int DESCRIPTION_MAX_LENGTH = 120;
34  
35      public static final String DESTINATION = "destination";
36  
37      public static final String DISABLE = "disable";
38  
39      public static final int GROUP_NAME_MAX_LENGTH = 80;
40  
41      public static final int JOB_NAME_MAX_LENGTH = 80;
42  
43      public static final String MESSAGE = "message";
44  
45      public static final String RECEIVER_KEY = "receiver_key";
46  
47      public List<SchedulerRequest> getScheduledJobs(String groupName)
48          throws SchedulerException;
49  
50      public void schedule(
51              Trigger trigger, String description, String destinationName,
52              Message message)
53          throws SchedulerException;
54  
55      public void shutdown() throws SchedulerException;
56  
57      public void start() throws SchedulerException;
58  
59      public void unschedule(Trigger trigger) throws SchedulerException;
60  
61  }