1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.tools.pamanager.servletcontainer;
18
19 import java.io.IOException;
20 import java.io.InputStream;
21
22 /***
23 *
24 * <p>
25 * ApplicationServerManager
26 * </p>
27 * <p>
28 * Implementations of this interface are used primarily by the
29 * {@link org.apache.jetspeed.tools.pamanager.ApplicationServerPAM}
30 * to interact with the servlet container that is supporting the web
31 * appliaction portion of deployed the portlet applications.
32 * </p>
33 * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
34 * @version $Id: ApplicationServerManager.java 516448 2007-03-09 16:25:47Z ate $
35 *
36 */
37 public interface ApplicationServerManager
38 {
39 /***
40 *
41 * <p>
42 * start
43 * </p>
44 * Starts the application represented by the context path, <code>appPath</code>
45 *
46 * @param appPath path to restart
47 * @return container-specific status message
48 * @throws HttpException
49 * @throws IOException
50 */
51 ApplicationServerManagerResult start( String appPath ) throws IOException;
52
53 /***
54 *
55 * <p>
56 * stop
57 * </p>
58 * Stops the application represented by the context path, <code>appPath</code>
59 *
60 * @param appPath
61 * @return container-specific status message
62 * @throws HttpException
63 * @throws IOException
64 */
65 ApplicationServerManagerResult stop( String appPath ) throws IOException;
66
67 /***
68 *
69 * <p>
70 * reload
71 * </p>
72 * Reloads the application represented by the context path, <code>appPath</code>. This
73 * must included re-reading the web.xml and reloading all classpath resources.
74 *
75 * @param appPath
76 * @return container-specific status message
77 * @throws HttpException
78 * @throws IOException
79 */
80 ApplicationServerManagerResult reload( String appPath ) throws IOException;
81
82 /***
83 *
84 * <p>
85 * undeploy
86 * </p>
87 * Undeploys the application represented by the context path, <code>appPath</cod
88 * @param appPath
89 * @return container-specific status message
90 * @throws HttpException
91 * @throws IOException
92 */
93 ApplicationServerManagerResult undeploy( String appPath ) throws IOException;
94
95 /***
96 *
97 * <p>
98 * deploy
99 * </p>
100 *
101 * Deploys the contents of the InputStream, <code>is</code>, into the parent servlet
102 * container using the specified <code>appPath</code> as the context path.
103 *
104 * @param appPath
105 * @param is
106 * @param size size (in bytes) of InputStream <code>is</code>
107 * @return
108 * @throws HttpException
109 * @throws IOException
110 */
111 ApplicationServerManagerResult deploy( String appPath, InputStream is, int size ) throws IOException;
112
113 /***
114 *
115 * <p>
116 * getHostPort
117 * </p>
118 *
119 * @return
120 */
121 int getHostPort();
122
123 /***
124 *
125 * <p>
126 * getHostUrl
127 * </p>
128 *
129 * @return
130 */
131 String getHostUrl();
132
133 /***
134 *
135 * <p>
136 * isConnected
137 * </p>
138 *
139 * @return
140 */
141 boolean isConnected();
142
143 /***
144 * <p> Returns the name of the target directory or archive where the portlet app will be
145 * deployed as known to the application server
146 * </p>
147 */
148 String getAppServerTarget(String appName);
149
150 }