Skip to content

Package: CargoApplication

CargoApplication

nameinstructionbranchcomplexitylinemethod
CargoApplication(Deployer, Deployable, URL, DeployedService)
M: 11 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
undeploy()
M: 14 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * Copyright (c) 1997, 2022 Oracle and/or its affiliates. All rights reserved.
3: *
4: * This program and the accompanying materials are made available under the
5: * terms of the Eclipse Distribution License v. 1.0, which is available at
6: * http://www.eclipse.org/org/documents/edl-v10.php.
7: *
8: * SPDX-License-Identifier: BSD-3-Clause
9: */
10:
11: package com.sun.xml.ws.test.container.cargo;
12:
13: import com.sun.xml.ws.test.container.AbstractHttpApplication;
14: import com.sun.xml.ws.test.container.Application;
15: import com.sun.xml.ws.test.container.DeployedService;
16: import org.codehaus.cargo.container.deployable.Deployable;
17: import org.codehaus.cargo.container.deployer.Deployer;
18:
19: import java.net.URL;
20:
21: /**
22: * {@link Application} implementation for Cargo.
23: *
24: * @author Kohsuke Kawaguchi
25: */
26: final class CargoApplication extends AbstractHttpApplication {
27: private final Deployer deployer;
28: private final Deployable war;
29:
30: public CargoApplication(Deployer deployer, Deployable war, URL warURL, DeployedService service) {
31: super(warURL,service);
32: this.deployer = deployer;
33: this.war = war;
34: }
35:
36: public void undeploy() throws Exception {
37: System.out.println("Undeploying a service");
38: try {
39: deployer.undeploy(war);
40: } catch (Exception e) {
41: // only log failures for undeploy in embedded mode
42: System.out.println("Failed to undeploy a service");
43: }
44: }
45: }