01: /**
02: *
03: */package org.drools.concurrent;
04:
05: import java.io.Serializable;
06:
07: /**
08: * This class instance is configed by the RuleBaseConfiguration and is responsible for thread management
09: * of the async services.
10: *
11: */
12: public interface ExecutorService extends Serializable {
13:
14: /**
15: * The CommandExecutor is a producer/consumer style class that handles the queue and execution
16: * of the async actions
17: * @param executor
18: */
19: public void setCommandExecutor(CommandExecutor executor);
20:
21: /**
22: * Submit a command for execution, adds it ot the commandExecutor's queue
23: * @param command
24: * @return
25: */
26: Future submit(Command command);
27:
28: /**
29: * Shutdown this ExecutorService
30: *
31: */
32: void shutDown();
33:
34: /**
35: * Startup this ExecutorService, typically called on first submit for lazy startup.
36: *
37: */
38: void startUp();
39: }
|