source: josm/trunk/src/org/openstreetmap/josm/spi/lifecycle/InitializationSequence.java@ 14183

Last change on this file since 14183 was 14139, checked in by Don-vip, 6 years ago

see #15229 - move Main initialization methods to lifecycle SPI + new class MainInitialization

  • Property svn:eol-style set to native
File size: 1.8 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.spi.lifecycle;
3
4import java.util.Collection;
5import java.util.Collections;
6import java.util.List;
7import java.util.concurrent.Callable;
8
9/**
10 * Defines the initialization sequence.
11 * @since 14139
12 */
13public interface InitializationSequence {
14
15 /**
16 * Returns tasks that must be run before parallel tasks.
17 * @return tasks that must be run before parallel tasks
18 * @see #afterInitializationTasks
19 * @see #parallelInitializationTasks
20 */
21 default List<InitializationTask> beforeInitializationTasks() {
22 return Collections.emptyList();
23 }
24
25 /**
26 * Returns tasks to be executed (in parallel) by a ExecutorService.
27 * @return tasks to be executed (in parallel) by a ExecutorService
28 */
29 default Collection<InitializationTask> parallelInitializationTasks() {
30 return Collections.emptyList();
31 }
32
33 /**
34 * Returns asynchronous callable initializations to be completed eventually
35 * @return asynchronous callable initializations to be completed eventually
36 */
37 default List<Callable<?>> asynchronousCallableTasks() {
38 return Collections.emptyList();
39 }
40
41 /**
42 * Returns asynchronous runnable initializations to be completed eventually
43 * @return asynchronous runnable initializations to be completed eventually
44 */
45 default List<Runnable> asynchronousRunnableTasks() {
46 return Collections.emptyList();
47 }
48
49 /**
50 * Returns tasks that must be run after parallel tasks.
51 * @return tasks that must be run after parallel tasks
52 * @see #beforeInitializationTasks
53 * @see #parallelInitializationTasks
54 */
55 default List<InitializationTask> afterInitializationTasks() {
56 return Collections.emptyList();
57 }
58}
Note: See TracBrowser for help on using the repository browser.