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.soap;
07:
08: import java.lang.annotation.Documented;
09: import java.lang.annotation.Target;
10: import java.lang.annotation.ElementType;
11: import java.lang.annotation.Retention;
12: import java.lang.annotation.RetentionPolicy;
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(ElementType.TYPE)
34: @Retention(RetentionPolicy.RUNTIME)
35: @Documented
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: }
|