@Retention(RUNTIME)
@Target({TYPE,METHOD,FIELD})
@Documented
@WebServiceFeatureAnnotation(id="http://jax-ws.dev.java.net/features/mime",
bean=StreamingAttachmentFeature.class)
public @interface StreamingAttachment
This feature represents the use of StreamingAttachment attachments with a
web service.
for e.g.: To keep all MIME attachments in memory, do the following
@WebService @MIME(memoryThreshold=-1L) public class HelloService { }
- Author:
- Jitendra Kotamraju
- See Also:
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionDirectory in which large attachments are stored.long
After this threshold(no of bytes per attachment), large attachment is written to file system.boolean
MIME message is parsed eagerly.
-
Element Details
-
dir
String dirDirectory in which large attachments are stored.File.createTempFile(java.lang.String, java.lang.String, java.io.File)
methods are used to create temp files for storing attachments. This value is used inFile.createTempFile(java.lang.String, java.lang.String, java.io.File)
, if specified. If a file cannot be created in this dir, then all the content is kept in memory.- Default:
- ""
-
parseEagerly
boolean parseEagerlyMIME message is parsed eagerly.- Default:
- false
-
memoryThreshold
long memoryThresholdAfter this threshold(no of bytes per attachment), large attachment is written to file system. If the value is -1, then all the attachment content is kept in memory.- Default:
- 1048576L
-