01: /*
02: * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
03: * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
04: */
05:
06: package javax.xml.ws;
07:
08: /**
09: * A WebServiceFeature is used to represent a feature that can be
10: * enabled or disabled for a web service.
11: * <p>
12: * The JAX-WS specification will define some standard features and
13: * JAX-WS implementors are free to define additional features if
14: * necessary. Vendor specific features may not be portable so
15: * caution should be used when using them. Each Feature definition
16: * MUST define a <code>public static final String ID</code>
17: * that can be used in the Feature annotation to refer
18: * to the feature. This ID MUST be unique across all features
19: * of all vendors. When defining a vendor specific feature ID,
20: * use a vendor specific namespace in the ID string.
21: *
22: * @see javax.xml.ws.RespectBindingFeature
23: * @see javax.xml.ws.soap.AddressingFeature
24: * @see javax.xml.ws.soap.MTOMFeature
25: *
26: * @since 2.1
27: */
28: public abstract class WebServiceFeature {
29: /**
30: * Each Feature definition MUST define a public static final
31: * String ID that can be used in the Feature annotation to refer
32: * to the feature.
33: */
34: // public static final String ID = "some unique feature Identifier";
35: /**
36: * Get the unique identifier for this WebServiceFeature.
37: *
38: * @return the unique identifier for this feature.
39: */
40: public abstract String getID();
41:
42: /**
43: * Specifies if the feature is enabled or disabled
44: */
45: protected boolean enabled = false;
46:
47: protected WebServiceFeature() {
48: }
49:
50: /**
51: * Returns <code>true</code> if this feature is enabled.
52: *
53: * @return <code>true</code> if and only if the feature is enabled .
54: */
55: public boolean isEnabled() {
56: return enabled;
57: }
58: }
|