001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package org.apache.jetspeed.tools.pamanager.servletcontainer;
018:
019: import java.io.IOException;
020: import java.io.InputStream;
021:
022: /**
023: *
024: * <p>
025: * ApplicationServerManager
026: * </p>
027: * <p>
028: * Implementations of this interface are used primarily by the
029: * {@link org.apache.jetspeed.tools.pamanager.ApplicationServerPAM}
030: * to interact with the servlet container that is supporting the web
031: * appliaction portion of deployed the portlet applications.
032: * </p>
033: * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
034: * @version $Id: ApplicationServerManager.java 516448 2007-03-09 16:25:47Z ate $
035: *
036: */
037: public interface ApplicationServerManager {
038: /**
039: *
040: * <p>
041: * start
042: * </p>
043: * Starts the application represented by the context path, <code>appPath</code>
044: *
045: * @param appPath path to restart
046: * @return container-specific status message
047: * @throws HttpException
048: * @throws IOException
049: */
050: ApplicationServerManagerResult start(String appPath)
051: throws IOException;
052:
053: /**
054: *
055: * <p>
056: * stop
057: * </p>
058: * Stops the application represented by the context path, <code>appPath</code>
059: *
060: * @param appPath
061: * @return container-specific status message
062: * @throws HttpException
063: * @throws IOException
064: */
065: ApplicationServerManagerResult stop(String appPath)
066: throws IOException;
067:
068: /**
069: *
070: * <p>
071: * reload
072: * </p>
073: * Reloads the application represented by the context path, <code>appPath</code>. This
074: * must included re-reading the web.xml and reloading all classpath resources.
075: *
076: * @param appPath
077: * @return container-specific status message
078: * @throws HttpException
079: * @throws IOException
080: */
081: ApplicationServerManagerResult reload(String appPath)
082: throws IOException;
083:
084: /**
085: *
086: * <p>
087: * undeploy
088: * </p>
089: * Undeploys the application represented by the context path, <code>appPath</cod
090: * @param appPath
091: * @return container-specific status message
092: * @throws HttpException
093: * @throws IOException
094: */
095: ApplicationServerManagerResult undeploy(String appPath)
096: throws IOException;
097:
098: /**
099: *
100: * <p>
101: * deploy
102: * </p>
103: *
104: * Deploys the contents of the InputStream, <code>is</code>, into the parent servlet
105: * container using the specified <code>appPath</code> as the context path.
106: *
107: * @param appPath
108: * @param is
109: * @param size size (in bytes) of InputStream <code>is</code>
110: * @return
111: * @throws HttpException
112: * @throws IOException
113: */
114: ApplicationServerManagerResult deploy(String appPath,
115: InputStream is, int size) throws IOException;
116:
117: /**
118: *
119: * <p>
120: * getHostPort
121: * </p>
122: *
123: * @return
124: */
125: int getHostPort();
126:
127: /**
128: *
129: * <p>
130: * getHostUrl
131: * </p>
132: *
133: * @return
134: */
135: String getHostUrl();
136:
137: /**
138: *
139: * <p>
140: * isConnected
141: * </p>
142: *
143: * @return
144: */
145: boolean isConnected();
146:
147: /**
148: * <p> Returns the name of the target directory or archive where the portlet app will be
149: * deployed as known to the application server
150: * </p>
151: */
152: String getAppServerTarget(String appName);
153:
154: }
|