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

java.lang.Object
  extended byorg.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 188436 2005-03-23 22:54:30Z ate $
Author:
Scott T. Weaver

Field Summary
private  String catalinaBase
           
private  String catalinaContextPath
           
private  String catalinaEngine
           
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
           
private  org.apache.commons.httpclient.HttpMethod install
           
protected static org.apache.commons.logging.Log log
           
private  String managerAppPath
           
private  String password
           
private  org.apache.commons.httpclient.HttpMethod reload
           
private  String reloadPath
           
private  String serverInfoPath
           
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

catalinaBase

private String catalinaBase

catalinaEngine

private String catalinaEngine

catalinaContextPath

private String catalinaContextPath

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

reloadPath

private String reloadPath

serverInfoPath

private String serverInfoPath

client

private org.apache.commons.httpclient.HttpClient client

start

private org.apache.commons.httpclient.HttpMethod start

stop

private org.apache.commons.httpclient.HttpMethod stop

reload

private org.apache.commons.httpclient.HttpMethod reload

undeploy

private org.apache.commons.httpclient.HttpMethod undeploy

deploy

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

install

private org.apache.commons.httpclient.HttpMethod install
Constructor Detail

TomcatManager

public TomcatManager(String catalinaBase,
                     String catalinaEngine,
                     String hostName,
                     int hostPort,
                     String userName,
                     String password)
              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-2005 Apache Software Foundation. All Rights Reserved.