Skip to content

Package: JavaSeApplication

JavaSeApplication

nameinstructionbranchcomplexitylinemethod
JavaSeApplication(Object[], URL, DeployedService)
M: 8 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
undeploy()
M: 33 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * Copyright (c) 1997, 2020 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.javase;
12:
13: import com.sun.istack.NotNull;
14: import com.sun.xml.ws.test.client.InterpreterEx;
15: import com.sun.xml.ws.test.container.AbstractHttpApplication;
16: import com.sun.xml.ws.test.container.Application;
17: import com.sun.xml.ws.test.container.DeployedService;
18:
19: import java.net.URL;
20:
21: /**
22: * {@link Application} implementation for {@link JavaSeContainer}.
23: *
24: * @author Jitendra Kotamraju
25: */
26: final class JavaSeApplication extends AbstractHttpApplication {
27:
28:
29: /**
30: * <tt>jakarta.xml.ws.Endpoint</tt> objects. This is loaded in another classloader,
31: * so we can't use a typed value.
32: */
33: private final @NotNull Object[] servers;
34:
35:
36: JavaSeApplication(Object[] servers, URL baseAddress, DeployedService service) {
37: super(baseAddress, service);
38: this.servers = servers;
39: }
40:
41: /**
42: * Removes this application from the container.
43: */
44: public void undeploy() throws Exception {
45:• for(Object server : servers) {
46: InterpreterEx i = new InterpreterEx(server.getClass().getClassLoader());
47: i.set("server",server);
48: i.eval("server.stop()");
49: }
50: }
51: }
52: