Class EmbeddedCargoApplicationContainer
- java.lang.Object
-
- com.sun.xml.ws.test.container.AbstractApplicationContainer
-
- com.sun.xml.ws.test.container.cargo.EmbeddedCargoApplicationContainer
-
- All Implemented Interfaces:
ApplicationContainer
public class EmbeddedCargoApplicationContainer extends AbstractApplicationContainer
ApplicationContainerthat loads the container into the harness VM.This mode still requires the local installation of the container, to load jar files from.
- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description protected CcontainerExpected to be set by the constructor of the derived class.protected org.codehaus.cargo.generic.deployable.DefaultDeployableFactorydeployableFactoryprotected org.codehaus.cargo.generic.deployer.DefaultDeployerFactorydeployerFactoryprotected inthttpPort
-
Constructor Summary
Constructors Constructor Description EmbeddedCargoApplicationContainer(WsTool wsimport, WsTool wsgen, String containerId, int port, boolean httpspi)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancopyRuntimeLibraries()Copy JAX-WS runtime code?Applicationdeploy(DeployedService service)Starts a service inside a container, making it ready to process requests.static intgetFreePort()protected URLgetServiceUrl(String contextPath)StringgetTransport()Returns the transport that this container uses for testing.protected booleanneedsArchive()True if the Cargo implementation only takes a .war file and not the exploded war image.voidshutdown()Stops the container.voidstart()Starts the container.StringtoString()-
Methods inherited from class com.sun.xml.ws.test.container.AbstractApplicationContainer
assembleWar, createWARZip, getUnsupportedUses, updateWsgenOpts, updateWsitClient
-
-
-
-
Field Detail
-
httpPort
protected final int httpPort
-
container
protected C extends org.codehaus.cargo.container.Container container
Expected to be set by the constructor of the derived class. Conceptually final --- no update after that.
-
deployerFactory
protected final org.codehaus.cargo.generic.deployer.DefaultDeployerFactory deployerFactory
-
deployableFactory
protected final org.codehaus.cargo.generic.deployable.DefaultDeployableFactory deployableFactory
-
-
Method Detail
-
copyRuntimeLibraries
protected boolean copyRuntimeLibraries()
Description copied from class:AbstractApplicationContainerCopy JAX-WS runtime code?- Overrides:
copyRuntimeLibrariesin classAbstractApplicationContainer
-
needsArchive
protected boolean needsArchive()
True if the Cargo implementation only takes a .war file and not the exploded war image. Not creating a war file makes the testing faster.
-
start
public void start() throws ExceptionDescription copied from interface:ApplicationContainerStarts the container. This is invoked at the very beginning before any service is deployed.- Throws:
Exception
-
shutdown
public void shutdown() throws ExceptionDescription copied from interface:ApplicationContainerStops the container. This is invoked at the end to clean up any resources.- Throws:
Exception
-
getFreePort
public static int getFreePort()
-
getTransport
public String getTransport()
Description copied from interface:ApplicationContainerReturns the transport that this container uses for testing.- Returns:
- For example, "http", "local", "tcp", "jms", etc. It should match the scheme portion of the endpoint address URI. Never null. This value is compared in the descriptor's transport declaration to decide wheter to run a test or not.
-
deploy
@NotNull public Application deploy(DeployedService service) throws Exception
Description copied from interface:ApplicationContainerStarts a service inside a container, making it ready to process requests.- Throws:
Exception
-
-