|
||||||||||
| 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 String |
createDefaultDeployerUrl(Configuration configuration)
Returns a deployerURL based on default values. |
protected HttpURLConnection |
createDeployConnection(WAR war)
Creates an deploy connection for the deployer. |
protected HttpURLConnection |
createUndeployConnection(WAR war)
Creates an undeploy connection for the deployer. |
void |
deploy(Deployable deployable)
Deploy a Deployable to the running container and make it available for requests. |
protected String |
getResponseMessage(HttpURLConnection connection)
Returns the response message from the server in a string format. |
protected void |
pipe(InputStream in,
OutputStream out)
Reads all the data from the specified input stream and writes it to the specified output stream. |
void |
redeploy(Deployable deployable)
Redeploy a Deployable already deployed to the running container. |
protected String |
streamToString(InputStream in,
String charset)
Gets the data from the specified input stream as a string using the specified charset. |
protected static String |
toAuthorization(String username,
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 deployment| Method Detail |
|---|
public void deploy(Deployable deployable)
Deployable to the running container and make it available for requests.
deploy in interface Deployerdeploy in class AbstractDeployerdeployable - the Deployable to deployDeployer.deploy(Deployable)public void undeploy(Deployable deployable)
Deployable from the running container.
NOTE: THIS WILL DELETE THE WAR FROM THE WEBAPP DIRECTORY
undeploy in interface Deployerundeploy in class AbstractDeployerdeployable - The deployable to be undeployedDeployer.undeploy(org.codehaus.cargo.container.deployable.Deployable)public void redeploy(Deployable deployable)
Redeploy a Deployable already deployed to the running container. The service
becomes available for requests.
Note that this method will be unsupported by the Deployers based on the
AbstractCopyingInstalledLocalDeployer.
redeploy in interface Deployerredeploy in class AbstractDeployerdeployable - the Deployable to redeployDeployer.redeploy(Deployable)
protected HttpURLConnection createDeployConnection(WAR war)
throws IOException
war - The war to be deployed
IOException - If an IOException occurs
protected HttpURLConnection createUndeployConnection(WAR war)
throws IOException
war - The war to be undeployed
IOException - If an IOException occursprotected String createDefaultDeployerUrl(Configuration configuration)
configuration - The server configuration object
protected String getResponseMessage(HttpURLConnection connection)
throws IOException
connection - The connection used
IOException - If an IO Exception occured
protected void pipe(InputStream in,
OutputStream out)
throws IOException
in - the input stream to read fromout - the output stream to write to
IOException - if an i/o error occurs
protected String streamToString(InputStream in,
String charset)
throws IOException
in - the input stream to read fromcharset - the charset to use when constructing the string
IOException - if an i/o error occurs
protected static String toAuthorization(String username,
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 | |||||||||