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

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

public class TomcatManager
extends Object
implements org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManager

TomcatManager

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

Field Summary
private  org.apache.commons.httpclient.HttpClient client
           
private static String DEFAULT_MANAGER_APP_PATH
           
private  org.apache.commons.httpclient.methods.PutMethod deploy
           
private  String deployPath
           
private  int hostPort
           
private  String hostUrl
           
protected static org.apache.commons.logging.Log log
           
private  String managerAppPath
           
private  String password
           
private  org.apache.commons.httpclient.HttpMethod start
           
private  String startPath
           
private  org.apache.commons.httpclient.HttpMethod stop
           
private  String stopPath
           
private  org.apache.commons.httpclient.HttpMethod undeploy
           
private  String undeployPath
           
private  String userName
           
 
Constructor Summary
TomcatManager(String catalinaBase, String catalinaEngine, String hostName, int hostPort, String userName, String password)
           
 
Method Summary
protected  org.apache.commons.httpclient.NameValuePair[] buildConfigQueryArgs(String configPath, String appPath)
           
protected  org.apache.commons.httpclient.NameValuePair[] buildPathQueryArgs(String appPath)
           
protected  org.apache.commons.httpclient.NameValuePair[] buildWarQueryArgs(String warPath, String appPath)
           
 org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult deploy(String appPath, InputStream is, int size)
           
 String getAppServerTarget(String appName)
           
 int getHostPort()
           
 String getHostUrl()
           
 boolean isConnected()
           isConnected
private  org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult parseResult(String responseBody)
           
 org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult reload(String appPath)
           
 void start()
           
 org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult start(String appPath)
           
 void stop()
           stop
 org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult stop(String appPath)
           
 org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult undeploy(String appPath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MANAGER_APP_PATH

private static final String DEFAULT_MANAGER_APP_PATH
See Also:
Constant Field Values

log

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

hostUrl

private String hostUrl

hostPort

private int hostPort

userName

private String userName

password

private String password

managerAppPath

private String managerAppPath

stopPath

private String stopPath

startPath

private String startPath

deployPath

private String deployPath

undeployPath

private String undeployPath

client

private org.apache.commons.httpclient.HttpClient client

start

private org.apache.commons.httpclient.HttpMethod start

stop

private org.apache.commons.httpclient.HttpMethod stop

undeploy

private org.apache.commons.httpclient.HttpMethod undeploy

deploy

private org.apache.commons.httpclient.methods.PutMethod deploy
Constructor Detail

TomcatManager

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

parseResult

private org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult parseResult(String responseBody)

start

public void start()

start

public org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult start(String appPath)
                                                                                          throws IOException
Specified by:
start in interface org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManager
Throws:
IOException

stop

public org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult stop(String appPath)
                                                                                         throws IOException
Specified by:
stop in interface org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManager
Throws:
IOException

reload

public org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult reload(String appPath)
                                                                                           throws IOException
Specified by:
reload in interface org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManager
Throws:
IOException

undeploy

public org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult undeploy(String appPath)
                                                                                             throws IOException
Specified by:
undeploy in interface org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManager
Throws:
IOException

deploy

public org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManagerResult deploy(String appPath,
                                                                                                  InputStream is,
                                                                                                  int size)
                                                                                           throws IOException
Specified by:
deploy in interface org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManager
Throws:
IOException

buildPathQueryArgs

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

buildWarQueryArgs

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

buildConfigQueryArgs

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

getHostPort

public int getHostPort()
Specified by:
getHostPort in interface org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManager
Returns:

getHostUrl

public String getHostUrl()
Specified by:
getHostUrl in interface org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManager
Returns:

isConnected

public boolean isConnected()

isConnected

Specified by:
isConnected in interface org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManager
Returns:
See Also:
ApplicationServerManager.isConnected()

stop

public void stop()

stop

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

getAppServerTarget

public String getAppServerTarget(String appName)
Specified by:
getAppServerTarget in interface org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManager


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