|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.cargo.util.log.LoggedObject
org.codehaus.cargo.container.tomcat.internal.TomcatManager
public class TomcatManager
A Tomcat manager webapp invocation wrapper.
Constructor Summary | |
---|---|
TomcatManager(URL url)
Creates a Tomcat manager wrapper for the specified URL that uses a username of admin , an empty password and ISO-8859-1 URL encoding. |
|
TomcatManager(URL url,
String username)
Creates a Tomcat manager wrapper for the specified URL and username that uses an empty password and ISO-8859-1 URL encoding. |
|
TomcatManager(URL url,
String username,
String password)
Creates a Tomcat manager wrapper for the specified URL, username and password that uses ISO-8859-1 URL encoding. |
|
TomcatManager(URL url,
String username,
String password,
String charset)
Creates a Tomcat manager wrapper for the specified URL, username, password and URL encoding. |
Method Summary | |
---|---|
void |
deploy(String path,
InputStream war)
Deploys the specified WAR as a HTTP PUT to the specified context path. |
void |
deploy(String path,
InputStream war,
boolean update)
Deploys the specified WAR as a HTTP PUT to the specified context path, optionally undeploying the webapp if it already exists. |
void |
deploy(String path,
InputStream war,
boolean update,
String tag)
Deploys the specified WAR as a HTTP PUT to the specified context path, optionally undeploying the webapp if it already exists and using the specified tag name. |
void |
deploy(String path,
URL war)
Deploys the specified WAR as a URL to the specified context path. |
void |
deploy(String path,
URL war,
boolean update)
Deploys the specified WAR as a URL to the specified context path, optionally undeploying the webapp if it already exists. |
void |
deploy(String path,
URL war,
boolean update,
String tag)
Deploys the specified WAR as a URL to the specified context path, optionally undeploying the webapp if it already exists and using the specified tag name. |
void |
deployContext(String path,
URL config)
Deploys the specified context XML configuration to the specified context path. |
void |
deployContext(String path,
URL config,
boolean update)
Deploys the specified context XML configuration to the specified context path, optionally undeploying the webapp if it already exists. |
void |
deployContext(String path,
URL config,
boolean update,
String tag)
Deploys the specified context XML configuration to the specified context path, optionally undeploying the webapp if it already exists and using the specified tag name. |
void |
deployContext(String path,
URL config,
URL war)
Deploys the specified context XML configuration and WAR as a URL to the specified context path. |
void |
deployContext(String path,
URL config,
URL war,
boolean update)
Deploys the specified context XML configuration and WAR as a URL to the specified context path, optionally undeploying the webapp if it already exists. |
void |
deployContext(String path,
URL config,
URL war,
boolean update,
String tag)
Deploys the specified context XML configuration and WAR as a URL to the specified context path, optionally undeploying the webapp if it already exists and using the specified tag name. |
String |
getCharset()
Gets the URL encoding charset to use when communicating with Tomcat manager. |
String |
getPassword()
Gets the password to use when authenticating with Tomcat manager. |
TomcatDeployableStatus |
getStatus(String path)
Return the status of the webapp at the specified context path. |
URL |
getURL()
Gets the full URL of the Tomcat manager instance. |
String |
getUserAgent()
Gets the user agent name to use when communicating with Tomcat manager. |
String |
getUserName()
Gets the username to use when authenticating with Tomcat manager. |
protected void |
invoke(String path)
Invokes Tomcat manager with the specified command. |
protected String |
invoke(String path,
InputStream data)
Invokes Tomcat manager with the specified command and content data. |
String |
list()
List currently deployed webapps. |
void |
reload(String path)
Reloads the webapp at the specified context path. |
void |
remove(String path)
Removes the webapp at the specified context path. |
void |
setUserAgent(String userAgent)
Sets the user agent name to use when communicating with Tomcat manager. |
void |
start(String path)
Starts the webapp at the specified context path. |
void |
stop(String path)
Stops the webapp at the specified context path. |
void |
undeploy(String path)
Undeploys the webapp at the specified context path. |
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject |
---|
getLogger, setLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TomcatManager(URL url)
admin
, an empty password and ISO-8859-1 URL encoding.
url
- the full URL of the Tomcat manager instance to usepublic TomcatManager(URL url, String username)
url
- the full URL of the Tomcat manager instance to useusername
- the username to use when authenticating with Tomcat managerpublic TomcatManager(URL url, String username, String password)
url
- the full URL of the Tomcat manager instance to useusername
- the username to use when authenticating with Tomcat managerpassword
- the password to use when authenticating with Tomcat managerpublic TomcatManager(URL url, String username, String password, String charset)
url
- the full URL of the Tomcat manager instance to useusername
- the username to use when authenticating with Tomcat managerpassword
- the password to use when authenticating with Tomcat managercharset
- the URL encoding charset to use when communicating with Tomcat managerMethod Detail |
---|
public URL getURL()
public String getUserName()
public String getPassword()
public String getCharset()
public String getUserAgent()
public void setUserAgent(String userAgent)
userAgent
- the user agent name to use when communicating with Tomcat managerpublic void deploy(String path, URL war) throws TomcatManagerException, IOException
path
- the webapp context path to deploy towar
- the URL of the WAR to deploy
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occurspublic void deploy(String path, URL war, boolean update) throws TomcatManagerException, IOException
path
- the webapp context path to deploy towar
- the URL of the WAR to deployupdate
- whether to first undeploy the webapp if it already exists
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occurspublic void deploy(String path, URL war, boolean update, String tag) throws TomcatManagerException, IOException
path
- the webapp context path to deploy towar
- the URL of the WAR to deployupdate
- whether to first undeploy the webapp if it already existstag
- the tag name to use
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occurspublic void deploy(String path, InputStream war) throws TomcatManagerException, IOException
path
- the webapp context path to deploy towar
- an input stream to the WAR to deploy
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occurspublic void deploy(String path, InputStream war, boolean update) throws TomcatManagerException, IOException
path
- the webapp context path to deploy towar
- an input stream to the WAR to deployupdate
- whether to first undeploy the webapp if it already exists
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occurspublic void deploy(String path, InputStream war, boolean update, String tag) throws TomcatManagerException, IOException
path
- the webapp context path to deploy towar
- an input stream to the WAR to deployupdate
- whether to first undeploy the webapp if it already existstag
- the tag name to use
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occurspublic void deployContext(String path, URL config) throws TomcatManagerException, IOException
path
- the webapp context path to deploy toconfig
- the URL of the context XML configuration to deploy
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occurspublic void deployContext(String path, URL config, boolean update) throws TomcatManagerException, IOException
path
- the webapp context path to deploy toconfig
- the URL of the context XML configuration to deployupdate
- whether to first undeploy the webapp if it already exists
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occurspublic void deployContext(String path, URL config, boolean update, String tag) throws TomcatManagerException, IOException
path
- the webapp context path to deploy toconfig
- the URL of the context XML configuration to deployupdate
- whether to first undeploy the webapp if it already existstag
- the tag name to use
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occurspublic void deployContext(String path, URL config, URL war) throws TomcatManagerException, IOException
path
- the webapp context path to deploy toconfig
- the URL of the context XML configuration to deploywar
- the URL of the WAR to deploy
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occurspublic void deployContext(String path, URL config, URL war, boolean update) throws TomcatManagerException, IOException
path
- the webapp context path to deploy toconfig
- the URL of the context XML configuration to deploywar
- the URL of the WAR to deployupdate
- whether to first undeploy the webapp if it already exists
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occurspublic void deployContext(String path, URL config, URL war, boolean update, String tag) throws TomcatManagerException, IOException
path
- the webapp context path to deploy toconfig
- the URL of the context XML configuration to deploywar
- the URL of the WAR to deployupdate
- whether to first undeploy the webapp if it already existstag
- the tag name to use
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occurspublic void undeploy(String path) throws TomcatManagerException, IOException
path
- the webapp context path to undeploy
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occurspublic void remove(String path) throws TomcatManagerException, IOException
path
- the webapp context path to remove
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occurspublic void reload(String path) throws TomcatManagerException, IOException
path
- the webapp context path to reload
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occurspublic void start(String path) throws TomcatManagerException, IOException
path
- the webapp context path to start
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occurspublic void stop(String path) throws TomcatManagerException, IOException
path
- the webapp context path to stop
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occursprotected void invoke(String path) throws TomcatManagerException, IOException
path
- the Tomcat manager command to invoke
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occursprotected String invoke(String path, InputStream data) throws TomcatManagerException, IOException
path
- the Tomcat manager command to invokedata
- an input stream to the content data
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occurspublic String list() throws IOException, TomcatManagerException
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occurspublic TomcatDeployableStatus getStatus(String path) throws IOException, TomcatManagerException
path
- the webapp context path to get status
TomcatManagerException
- if the Tomcat manager request fails
IOException
- if an i/o error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |