Skip to content

Package: HelidonAdapterList

HelidonAdapterList

nameinstructionbranchcomplexitylinemethod
HelidonAdapterList()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
createHttpAdapter(String, String, WSEndpoint)
M: 39 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%
static {...}
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * Copyright (c) 2021 Oracle and/or its affiliates.
3: *
4: * Licensed under the Apache License, Version 2.0 (the "License");
5: * you may not use this file except in compliance with the License.
6: * You may obtain a copy of the License at
7: *
8: * http://www.apache.org/licenses/LICENSE-2.0
9: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.eclipse.metro.helidon;
18:
19: import com.sun.xml.ws.api.server.WSEndpoint;
20: import com.sun.xml.ws.transport.http.HttpAdapterList;
21: import java.util.logging.Level;
22: import java.util.logging.Logger;
23:
24: /**
25: *
26: * @author lukas
27: */
28: class HelidonAdapterList extends HttpAdapterList<HelidonAdapter> {
29:
30: private static final Logger LOGGER = Logger.getLogger(HelidonAdapterList.class.getName());
31:
32: @Override
33: protected HelidonAdapter createHttpAdapter(String name, String urlPattern, WSEndpoint<?> endpoint) {
34: HelidonAdapter ha = new HelidonAdapter(name, endpoint, this, urlPattern);
35: // registers adapter with the container
36: com.sun.xml.ws.api.server.Module module = endpoint.getContainer().getSPI(com.sun.xml.ws.api.server.Module.class);
37:• if (module != null) {
38: module.getBoundEndpoints().add(ha);
39: } else {
40: LOGGER.log(Level.WARNING, "Container {0} doesn''t support {1}",
41: new Object[]{endpoint.getContainer(), Module.class});
42: }
43: return ha;
44: }
45:
46: }