01: package dalma.container;
02:
03: import java.io.File;
04: import java.io.IOException;
05:
06: /**
07: * JMX interface for {@link Container}.
08: *
09: * @author Kohsuke Kawaguchi
10: */
11: public interface ContainerMBean {
12: /**
13: * Gets the root directory of the dalma container.
14: * @return never null
15: */
16: File getHomeDir();
17:
18: /**
19: * Stops all the applications in the container.
20: */
21: void stop();
22:
23: /**
24: * Deploys a new application.
25: *
26: * <p>
27: * This method blocks until the application is installed.
28: * If an application of the same name has been already installed,
29: * this method re-deploys it.
30: *
31: * @param name
32: * name of the new application, such as "foo."
33: * A directory of this name will be created.
34: *
35: * @throws FailedOperationException
36: * If for some reason the operation failed, such as an I/O error.
37: *
38: * @return
39: * A {@link WorkflowApplication} object that represents the deployed application.
40: * It maybe in the {@link WorkflowState#RUNNING running} state or in
41: * the {@link WorkflowState#STOPPED stopped} state, depending on various factors,
42: * such as whether the application is configured enough or whether it was running
43: * before (in case of update.)
44: */
45: WorkflowApplication deploy(String name, byte[] data)
46: throws InterruptedException, FailedOperationException;
47:
48: ///**
49: // * Enables the auto-redeployment feature.
50: // *
51: // * <p>
52: // * With this switch on, the container checks for addition/deletion/update
53: // * in the apps folder, and deploy/undeploy/redeploy applications accordingly.
54: // *
55: // * <p>
56: // * This feature is off by default.
57: // */
58: //void enableAutoRedeploy();
59:
60: ///**
61: // * Disables the auto-redeployment feature.
62: // *
63: // * @see #enableAutoRedeploy()
64: // */
65: //void disableAutoRedeploy();
66: }
|