JAX-WS
v2.1

javax.xml.ws.soap
Class MTOMFeature

java.lang.Object
  extended by javax.xml.ws.WebServiceFeature
      extended by javax.xml.ws.soap.MTOMFeature

public class MTOMFeature
extends WebServiceFeature

This feature represents the use of MTOM with a web service.

The following describes the affects of this feature with respect to being enabled or disabled:

The setThreshold(int) method can be used to set the threshold value used to determine when binary data should be XOP encoded.

Since:
JAX-WS 2.1

Field Summary
static java.lang.String ID
          Constant value identifying the MTOMFeature
protected  int threshold
          Property for MTOM threshold value.
static java.lang.String THRESHOLD
          Constant ID for the THRESHOLD Feature parameter
 
Fields inherited from class javax.xml.ws.WebServiceFeature
enabled
 
Constructor Summary
MTOMFeature()
          Create an MTOMFeature.
MTOMFeature(boolean enabled)
          Creates an MTOMFeature.
MTOMFeature(boolean enabled, int threshold)
          Creates an MTOMFeature.
MTOMFeature(int threshold)
          Creates an MTOMFeature.
 
Method Summary
 java.lang.String getID()
          Get the unique identifier for this WebServiceFeature.
 int getThreshold()
          Gets the threshold value used to determine when binary data should be XOP encoded.
 void setThreshold(int threshold)
          Set the threshold value used to determine when binary data should be XOP encoded.
 
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 java.lang.String ID
Constant value identifying the MTOMFeature

See Also:
Constant Field Values

THRESHOLD

public static final java.lang.String THRESHOLD
Constant ID for the THRESHOLD Feature parameter

See Also:
Constant Field Values

threshold

protected int threshold
Property for MTOM threshold value. When MTOM is enabled, binary data above this size in bytes will be XOP encoded or sent as attachment. The value of this property MUST always be >= 0.

Constructor Detail

MTOMFeature

public MTOMFeature()
Create an MTOMFeature. The instance created will be enabled.


MTOMFeature

public MTOMFeature(boolean enabled)
Creates an MTOMFeature.

Parameters:
enabled - specifies if this feature should be enabled or not

MTOMFeature

public MTOMFeature(int threshold)
Creates an MTOMFeature. The instance created will be enabled.

Parameters:
threshold - the size in bytes that binary data must be before being XOP encoded.
Throws:
WebServiceException - if threshold is < 0

MTOMFeature

public MTOMFeature(boolean enabled,
                   int threshold)
Creates an MTOMFeature.

Parameters:
enabled - specifies if this feature should be enabled or not
threshold - the size in bytes that binary data must be before being XOP encoded.
Throws:
WebServiceException - if threshold is < 0
Method Detail

getID

public java.lang.String getID()
Get the unique identifier for this WebServiceFeature.

Specified by:
getID in class WebServiceFeature
Returns:
the unique identifier for this feature.

getThreshold

public int getThreshold()
Gets the threshold value used to determine when binary data should be XOP encoded.

Returns:
the current threshold size in bytes

setThreshold

public void setThreshold(int threshold)
Set the threshold value used to determine when binary data should be XOP encoded.

Parameters:
threshold - the size in bytes that binary data must be before being XOP encoded.
Throws:
WebServiceException - if threshold is < 0

JAX-WS
v2.1


Comments to: jsr224-spec-comments@sun.com
More information at: http://java.sun.com/xml/jax-ws

Copyright © 2006 by Sun Microsystems, Inc., 4150 Network Circle,
Santa Clara, California 95054, U.S.A. All Rights Reserved.