|
||||||||||
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.spi.deployer.AbstractDeployer
org.codehaus.cargo.container.spi.deployer.AbstractRemoteDeployer
org.codehaus.cargo.container.jetty.JettyRemoteDeployer
public class JettyRemoteDeployer
A remote deployer for the Jetty container. NOTE: undeploy DELETES the webapp from the Jetty webapp directory Limitations: - will not undeploy files from anywhere other than the servers webapp directory - cannot be used to undeploy webapps that were deployed using a xml context file in /contexts - should not be used with multiple webapps sharing a common war.
Constructor Summary | |
---|---|
JettyRemoteDeployer(RemoteContainer container)
Remote deployer for the Jetty container. |
Method Summary | |
---|---|
protected java.lang.String |
createDefaultDeployerUrl(Configuration configuration)
Returns a deployerURL based on default values. |
protected java.net.HttpURLConnection |
createDeployConnection(WAR war)
Creates an deploy connection for the deployer. |
protected java.net.HttpURLConnection |
createUndeployConnection(WAR war)
Creates an undeploy connection for the deployer. |
void |
deploy(Deployable deployable)
|
protected java.lang.String |
getResponseMessage(java.net.HttpURLConnection connection)
Returns the response message from the server in a string format. |
protected void |
pipe(java.io.InputStream in,
java.io.OutputStream out)
Reads all the data from the specified input stream and writes it to the specified output stream. |
void |
redeploy(Deployable deployable)
|
protected java.lang.String |
streamToString(java.io.InputStream in,
java.lang.String charset)
Gets the data from the specified input stream as a string using the specified charset. |
protected static java.lang.String |
toAuthorization(java.lang.String username,
java.lang.String password)
Gets the HTTP Basic Authorization header value for the supplied username and password. |
void |
undeploy(Deployable deployable)
Undeploy a Deployable from the running container. |
Methods inherited from class org.codehaus.cargo.container.spi.deployer.AbstractRemoteDeployer |
---|
getType |
Methods inherited from class org.codehaus.cargo.container.spi.deployer.AbstractDeployer |
---|
deploy, deploy, start, stop, undeploy |
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 |
Methods inherited from interface org.codehaus.cargo.util.log.Loggable |
---|
getLogger, setLogger |
Constructor Detail |
---|
public JettyRemoteDeployer(RemoteContainer container)
container
- The container used for deploymentMethod Detail |
---|
public void deploy(Deployable deployable)
deploy
in interface Deployer
deploy
in class AbstractDeployer
public void undeploy(Deployable deployable)
Deployable
from the running container.
NOTE: THIS WILL DELETE THE WAR FROM THE WEBAPP DIRECTORY
undeploy
in interface Deployer
undeploy
in class AbstractDeployer
deployable
- The deployable to be undeployedpublic void redeploy(Deployable deployable)
redeploy
in interface Deployer
redeploy
in class AbstractDeployer
protected java.net.HttpURLConnection createDeployConnection(WAR war) throws java.io.IOException
war
- The war to be deployed
java.io.IOException
- If an IOException occursprotected java.net.HttpURLConnection createUndeployConnection(WAR war) throws java.io.IOException
war
- The war to be undeployed
java.io.IOException
- If an IOException occursprotected java.lang.String createDefaultDeployerUrl(Configuration configuration)
configuration
- The server configuration object
protected java.lang.String getResponseMessage(java.net.HttpURLConnection connection) throws java.io.IOException
connection
- The connection used
java.io.IOException
- If an IO Exception occuredprotected void pipe(java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException
in
- the input stream to read fromout
- the output stream to write to
java.io.IOException
- if an i/o error occursprotected java.lang.String streamToString(java.io.InputStream in, java.lang.String charset) throws java.io.IOException
in
- the input stream to read fromcharset
- the charset to use when constructing the string
java.io.IOException
- if an i/o error occursprotected static java.lang.String toAuthorization(java.lang.String username, java.lang.String password)
username
- the username to use for authenticationpassword
- the password to use for authentication
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |