com.sun.xml.ws.developer
Annotation Type StreamingAttachment


@Retention(value=RUNTIME)
@Target(value=TYPE)
@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

 

See Also:
StreamingAttachmentFeature

Optional Element Summary
 String dir
          Directory in which large attachments are stored.
 long memoryThreshold
          After this threshold(no of bytes per attachment), large attachment is written to file system.
 boolean parseEagerly
          MIME message is parsed eagerly.
 

dir

public abstract String dir
Directory 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 in File.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

public abstract boolean parseEagerly
MIME message is parsed eagerly.

Default:
false

memoryThreshold

public abstract long memoryThreshold
After 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