01: package dalma.container;
02:
03: import static dalma.container.WorkflowState.UNLOADED;
04:
05: import java.io.IOException;
06: import java.io.File;
07:
08: /**
09: * JMX interface for {@link WorkflowApplication}.
10: *
11: * @see WorkflowApplication
12: * @author Kohsuke Kawaguchi
13: */
14: public interface WorkflowApplicationMBean {
15: void start() throws FailedOperationException;
16:
17: void stop();
18:
19: void unload();
20:
21: /**
22: * Moves the state to {@link WorkflowState#STOPPED}.
23: */
24: void load() throws FailedOperationException;
25:
26: void undeploy() throws FailedOperationException;
27:
28: String getName();
29:
30: String getDescription();
31:
32: WorkflowState getState();
33:
34: File getConfigFile();
35:
36: /**
37: * Returns true if this {@link WorkflowApplication} is configured enough
38: * to be able to {@link #start() start}.
39: *
40: * @return
41: * false if some mandatory configuration entries are missing,
42: * or if the current state is {@link WorkflowState#UNLOADED}
43: * (in which case we can't tell if it's configured or not.)
44: */
45: boolean isConfigured();
46: }
|