org.duracloud.services.webapputil.tomcat
Class TomcatInstance

java.lang.Object
  extended by org.duracloud.services.webapputil.tomcat.TomcatInstance

public class TomcatInstance
extends java.lang.Object

This class is a stateful representation of a tomcat instance. It may be started or stopped, and webapps may be deployed to it or undeployed from it.

Author:
Andrew Woods Date: Dec 2, 2009

Constructor Summary
TomcatInstance(java.io.File catalinaHome, int port)
           
 
Method Summary
 void deploy(java.lang.String context, java.io.InputStream war)
          This method deploys the arg war into the appserver under the arg context.
 java.io.File getCatalinaHome()
           
 int getPort()
           
 void start()
          This method starts the tomcat instance.
 void start(java.util.Map<java.lang.String,java.lang.String> env)
           
 void stop()
          This method shutsdown the tomcat instance.
 void unDeploy(java.lang.String context)
          This method undeploys the webapp found under the arg context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TomcatInstance

public TomcatInstance(java.io.File catalinaHome,
                      int port)
Method Detail

start

public void start()
This method starts the tomcat instance. i.e. ./bin/startup.[sh|bat]


start

public void start(java.util.Map<java.lang.String,java.lang.String> env)

stop

public void stop()
This method shutsdown the tomcat instance. i.e. ./bin/shutdown.[sh|bat]


deploy

public void deploy(java.lang.String context,
                   java.io.InputStream war)
This method deploys the arg war into the appserver under the arg context. The arg war inputstream is closed by this method.

Parameters:
context - of deployed webapp
war - to be deployed

unDeploy

public void unDeploy(java.lang.String context)
This method undeploys the webapp found under the arg context

Parameters:
context - to be undeployed

getCatalinaHome

public java.io.File getCatalinaHome()

getPort

public int getPort()


Copyright © 2009-2011 DuraSpace. All Rights Reserved.