KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > xml > ws > WebServiceFeature


1 /*
2  * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
3  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4  */

5
6 package javax.xml.ws;
7
8
9 /**
10  * A WebServiceFeature is used to represent a feature that can be
11  * enabled or disabled for a web service.
12  * <p>
13  * The JAX-WS specification will define some standard features and
14  * JAX-WS implementors are free to define additional features if
15  * necessary. Vendor specific features may not be portable so
16  * caution should be used when using them. Each Feature definition
17  * MUST define a <code>public static final String ID</code>
18  * that can be used in the Feature annotation to refer
19  * to the feature. This ID MUST be unique across all features
20  * of all vendors. When defining a vendor specific feature ID,
21  * use a vendor specific namespace in the ID string.
22  *
23  * @see javax.xml.ws.RespectBindingFeature
24  * @see javax.xml.ws.soap.AddressingFeature
25  * @see javax.xml.ws.soap.MTOMFeature
26  *
27  * @since 2.1
28  */

29 public abstract class WebServiceFeature {
30    /**
31     * Each Feature definition MUST define a public static final
32     * String ID that can be used in the Feature annotation to refer
33     * to the feature.
34     */

35    // public static final String ID = "some unique feature Identifier";
36

37    /**
38     * Get the unique identifier for this WebServiceFeature.
39     *
40     * @return the unique identifier for this feature.
41     */

42    public abstract String JavaDoc getID();
43     
44    /**
45     * Specifies if the feature is enabled or disabled
46     */

47    protected boolean enabled = false;
48    
49    
50    protected WebServiceFeature(){}
51    
52
53    /**
54     * Returns <code>true</code> if this feature is enabled.
55     *
56     * @return <code>true</code> if and only if the feature is enabled .
57     */

58    public boolean isEnabled() {
59        return enabled;
60    }
61 }
62
Popular Tags