com.sun.xml.ws.developer
Class StreamingAttachmentFeature

java.lang.Object
  extended by javax.xml.ws.WebServiceFeature
      extended by com.sun.xml.ws.developer.StreamingAttachmentFeature

@ManagedData
public final class StreamingAttachmentFeature
extends WebServiceFeature

Proxy needs to be created with this feature to configure StreamingAttachment attachments behaviour.

 for e.g.: To configure all StreamingAttachment attachments to be kept in memory
 

StreamingAttachmentFeature feature = new StreamingAttachmentFeature(); feature.setAllMemory(true); proxy = HelloService().getHelloPort(feature);


Field Summary
static String ID
          Constant value identifying the @StreamingAttachment feature.
 
Fields inherited from class javax.xml.ws.WebServiceFeature
enabled
 
Constructor Summary
StreamingAttachmentFeature()
           
StreamingAttachmentFeature(String dir, boolean parseEagerly, long memoryThreshold)
           
 
Method Summary
 org.jvnet.mimepull.MIMEConfig getConfig()
          Returns the configuration object.
 String getID()
           
 void setDir(String dir)
          Directory in which large attachments are stored
 void setMemoryThreshold(long memoryThreshold)
          After this threshold(no of bytes), large attachments are written to file system
 void setParseEagerly(boolean parseEagerly)
          StreamingAttachment message is parsed eagerly
 
Methods inherited from class javax.xml.ws.WebServiceFeature
isEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
Constant value identifying the @StreamingAttachment feature.

See Also:
Constant Field Values
Constructor Detail

StreamingAttachmentFeature

public StreamingAttachmentFeature()

StreamingAttachmentFeature

public StreamingAttachmentFeature(@Nullable
                                  String dir,
                                  boolean parseEagerly,
                                  long memoryThreshold)
Method Detail

getID

@ManagedAttribute
public String getID()
Specified by:
getID in class WebServiceFeature

getConfig

@ManagedAttribute
public org.jvnet.mimepull.MIMEConfig getConfig()
Returns the configuration object. Once this is called, you cannot change the configuration.

Returns:

setDir

public void setDir(String dir)
Directory in which large attachments are stored


setParseEagerly

public void setParseEagerly(boolean parseEagerly)
StreamingAttachment message is parsed eagerly


setMemoryThreshold

public void setMemoryThreshold(long memoryThreshold)
After this threshold(no of bytes), large attachments are written to file system



Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.