Skip to content

Package: WebServiceFeature

WebServiceFeature

nameinstructionbranchcomplexitylinemethod
WebServiceFeature()
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
isEnabled()
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%

Coverage

1: /*
2: * Copyright (c) 2005, 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 jakarta.xml.ws;
12:
13:
14: /**
15: * A WebServiceFeature is used to represent a feature that can be
16: * enabled or disabled for a web service.
17: * <p>
18: * The Jakarta XML Web Services specification will define some standard features and
19: * Jakarta XML Web Services implementors are free to define additional features if
20: * necessary. Vendor specific features may not be portable so
21: * caution should be used when using them. Each Feature definition
22: * MUST define a {@code public static final String ID}
23: * that can be used in the Feature annotation to refer
24: * to the feature. This ID MUST be unique across all features
25: * of all vendors. When defining a vendor specific feature ID,
26: * use a vendor specific namespace in the ID string.
27: *
28: * @see jakarta.xml.ws.RespectBindingFeature
29: * @see jakarta.xml.ws.soap.AddressingFeature
30: * @see jakarta.xml.ws.soap.MTOMFeature
31: *
32: * @since 1.6, JAX-WS 2.1
33: */
34: public abstract class WebServiceFeature {
35: /**
36: * Each Feature definition MUST define a public static final
37: * String ID that can be used in the Feature annotation to refer
38: * to the feature.
39: */
40: // public static final String ID = "some unique feature Identifier";
41:
42: /**
43: * Get the unique identifier for this WebServiceFeature.
44: *
45: * @return the unique identifier for this feature.
46: */
47: public abstract String getID();
48:
49: /**
50: * Specifies if the feature is enabled or disabled
51: */
52: protected boolean enabled = false;
53:
54: /**
55: * Default constructor.
56: */
57: protected WebServiceFeature() {}
58:
59: /**
60: * Returns {@code true} if this feature is enabled.
61: *
62: * @return {@code true} if and only if the feature is enabled .
63: */
64: public boolean isEnabled() {
65: return enabled;
66: }
67: }