org.apache.jetspeed.tools.pamanager.servletcontainer
Class TomcatManager

java.lang.Object
  extended by org.apache.jetspeed.tools.pamanager.servletcontainer.TomcatManager
All Implemented Interfaces:
ApplicationServerManager

public class TomcatManager
extends java.lang.Object
implements ApplicationServerManager

TomcatManager

Version:
$Id: TomcatManager.java 517719 2007-03-13 15:05:48Z ate $
Author:
Scott T. Weaver

Field Summary
protected static org.apache.commons.logging.Log log
           
 
Constructor Summary
TomcatManager(java.lang.String catalinaBase, java.lang.String catalinaEngine, java.lang.String hostName, int hostPort, java.lang.String userName, java.lang.String password)
           
 
Method Summary
protected  org.apache.commons.httpclient.NameValuePair[] buildConfigQueryArgs(java.lang.String configPath, java.lang.String appPath)
           
protected  org.apache.commons.httpclient.NameValuePair[] buildPathQueryArgs(java.lang.String appPath)
           
protected  org.apache.commons.httpclient.NameValuePair[] buildWarQueryArgs(java.lang.String warPath, java.lang.String appPath)
           
 ApplicationServerManagerResult deploy(java.lang.String appPath, java.io.InputStream is, int size)
           deploy
 java.lang.String getAppServerTarget(java.lang.String appName)
           Returns the name of the target directory or archive where the portlet app will be deployed as known to the application server
 int getHostPort()
           getHostPort
 java.lang.String getHostUrl()
           getHostUrl
 boolean isConnected()
           isConnected
 ApplicationServerManagerResult reload(java.lang.String appPath)
           reload
 void start()
           
 ApplicationServerManagerResult start(java.lang.String appPath)
           start
 void stop()
           stop
 ApplicationServerManagerResult stop(java.lang.String appPath)
           stop
 ApplicationServerManagerResult undeploy(java.lang.String appPath)
           undeploy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.commons.logging.Log log
Constructor Detail

TomcatManager

public TomcatManager(java.lang.String catalinaBase,
                     java.lang.String catalinaEngine,
                     java.lang.String hostName,
                     int hostPort,
                     java.lang.String userName,
                     java.lang.String password)
              throws java.io.IOException
Throws:
java.io.IOException
Method Detail

start

public void start()

start

public ApplicationServerManagerResult start(java.lang.String appPath)
                                     throws java.io.IOException
Description copied from interface: ApplicationServerManager

start

Starts the application represented by the context path, appPath

Specified by:
start in interface ApplicationServerManager
Parameters:
appPath - path to restart
Returns:
container-specific status message
Throws:
java.io.IOException

stop

public ApplicationServerManagerResult stop(java.lang.String appPath)
                                    throws java.io.IOException
Description copied from interface: ApplicationServerManager

stop

Stops the application represented by the context path, appPath

Specified by:
stop in interface ApplicationServerManager
Returns:
container-specific status message
Throws:
java.io.IOException

reload

public ApplicationServerManagerResult reload(java.lang.String appPath)
                                      throws java.io.IOException
Description copied from interface: ApplicationServerManager

reload

Reloads the application represented by the context path, appPath. This must included re-reading the web.xml and reloading all classpath resources.

Specified by:
reload in interface ApplicationServerManager
Returns:
container-specific status message
Throws:
java.io.IOException

undeploy

public ApplicationServerManagerResult undeploy(java.lang.String appPath)
                                        throws java.io.IOException
Description copied from interface: ApplicationServerManager

undeploy

Undeploys the application represented by the context path, appPath
Specified by:
undeploy in interface ApplicationServerManager
Returns:
container-specific status message
Throws:
java.io.IOException

deploy

public ApplicationServerManagerResult deploy(java.lang.String appPath,
                                             java.io.InputStream is,
                                             int size)
                                      throws java.io.IOException
Description copied from interface: ApplicationServerManager

deploy

Deploys the contents of the InputStream, is, into the parent servlet container using the specified appPath as the context path.

Specified by:
deploy in interface ApplicationServerManager
size - size (in bytes) of InputStream is
Returns:
Throws:
java.io.IOException

buildPathQueryArgs

protected org.apache.commons.httpclient.NameValuePair[] buildPathQueryArgs(java.lang.String appPath)

buildWarQueryArgs

protected org.apache.commons.httpclient.NameValuePair[] buildWarQueryArgs(java.lang.String warPath,
                                                                          java.lang.String appPath)
                                                                   throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

buildConfigQueryArgs

protected org.apache.commons.httpclient.NameValuePair[] buildConfigQueryArgs(java.lang.String configPath,
                                                                             java.lang.String appPath)
                                                                      throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

getHostPort

public int getHostPort()
Description copied from interface: ApplicationServerManager

getHostPort

Specified by:
getHostPort in interface ApplicationServerManager
Returns:

getHostUrl

public java.lang.String getHostUrl()
Description copied from interface: ApplicationServerManager

getHostUrl

Specified by:
getHostUrl in interface ApplicationServerManager
Returns:

isConnected

public boolean isConnected()

isConnected

Specified by:
isConnected in interface ApplicationServerManager
Returns:
See Also:
ApplicationServerManager.isConnected()

stop

public void stop()

stop

See Also:
org.picocontainer.Startable#stop()

getAppServerTarget

public java.lang.String getAppServerTarget(java.lang.String appName)
Description copied from interface: ApplicationServerManager

Returns the name of the target directory or archive where the portlet app will be deployed as known to the application server

Specified by:
getAppServerTarget in interface ApplicationServerManager


Copyright © 1999-2009 Apache Software Foundation. All Rights Reserved.