KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > xml > ws > soap > MTOM


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.soap;
7
8 import java.lang.annotation.Documented JavaDoc;
9 import java.lang.annotation.Target JavaDoc;
10 import java.lang.annotation.ElementType JavaDoc;
11 import java.lang.annotation.Retention JavaDoc;
12 import java.lang.annotation.RetentionPolicy JavaDoc;
13
14 import javax.xml.ws.spi.WebServiceFeatureAnnotation;
15
16 /**
17  * This feature represents the use of MTOM with a
18  * web service.
19  *
20  * <p>
21  * The following describes the affects of this feature with respect
22  * to being enabled or disabled:
23  * <ul>
24  * <li> ENABLED: In this Mode, MTOM will be enabled.
25  * <li> DISABLED: In this Mode, MTOM will be disabled
26  * </ul>
27  * <p>
28  * The {@link #threshold} property can be used to set the threshold
29  * value used to determine when binary data should be XOP encoded.
30  *
31  * @since JAX-WS 2.1
32  */

33 @Target JavaDoc(ElementType.TYPE)
34 @Retention JavaDoc(RetentionPolicy.RUNTIME)
35 @Documented JavaDoc
36 @WebServiceFeatureAnnotation(id=MTOMFeature.ID,bean=MTOMFeature.class)
37 public @interface MTOM {
38     /**
39      * Specifies if this feature is enabled or disabled.
40      */

41     boolean enabled() default true;
42      
43     /**
44      * Property for MTOM threshold value. When MTOM is enabled, binary data above this
45      * size in bytes will be XOP encoded or sent as attachment. The value of this property
46      * MUST always be >= 0. Default value is 0.
47      */

48     int threshold() default 0;
49 }
50
Popular Tags