Top Description Fields Constructors Methods
javax.xml.ws.soap

public final Class MTOMFeature

extends WebServiceFeature
Class Inheritance
Imports
javax.xml.ws.WebServiceFeature, .WebServiceException, .Endpoint, .Service

This feature represents the use of MTOM with a web service. This feature can be used during the creation of SEI proxy, and javax.xml.ws.Dispatch instances on the client side and Endpoint instances on the server side. This feature cannot be used for Service instance creation on the client side.

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

The threshold property can be used to set the threshold value used to determine when binary data should be XOP encoded.

Since
1.6, JAX-WS 2.1

Field Summary

Modifier and TypeField and Description
public static final String
ID

Constant value identifying the MTOMFeature

protected int
threshold

Property for MTOM threshold value.

Inherited from javax.xml.ws.WebServiceFeature:
enabled

Constructor Summary

AccessConstructor and Description
public
MTOMFeature()

Create an MTOMFeature.

public
MTOMFeature(boolean
specifies if this feature should be enabled or not
enabled
)

Creates a MTOMFeature.

public
MTOMFeature(int
the size in bytes that binary data SHOULD be before being sent as an attachment.
threshold
)

Creates a MTOMFeature.

public
MTOMFeature(boolean
specifies if this feature should be enabled or not
enabled
,
int
the size in bytes that binary data SHOULD be before being sent as an attachment.
threshold
)

Creates a MTOMFeature.

Method Summary

Modifier and TypeMethod and Description
public String
getID()

Implements abstract javax.xml.ws.WebServiceFeature.getID.

Get the unique identifier for this WebServiceFeature.
public int

Returns:

the current threshold size in bytes
getThreshold
()

Gets the threshold value used to determine when binary data should be sent as an attachment.

Inherited from javax.xml.ws.WebServiceFeature:
isEnabled

Field Detail

IDback to summary
public static final String ID

Constant value identifying the MTOMFeature

thresholdback to summary
protected int threshold

Property for MTOM threshold value. This property serves as a hint when MTOM is enabled, binary data above this size in bytes SHOULD be sent as attachment. The value of this property MUST always be >= 0. Default value is 0.

Constructor Detail

MTOMFeatureback to summary
public MTOMFeature()

Create an MTOMFeature. The instance created will be enabled.

MTOMFeatureback to summary
public MTOMFeature(boolean enabled)

Creates a MTOMFeature.

Parameters
enabled:boolean

specifies if this feature should be enabled or not

MTOMFeatureback to summary
public MTOMFeature(int threshold)

Creates a MTOMFeature. The instance created will be enabled.

Parameters
threshold:int

the size in bytes that binary data SHOULD be before being sent as an attachment.

Exceptions
WebServiceException:
if threshold is < 0
MTOMFeatureback to summary
public MTOMFeature(boolean enabled, int threshold)

Creates a MTOMFeature.

Parameters
enabled:boolean

specifies if this feature should be enabled or not

threshold:int

the size in bytes that binary data SHOULD be before being sent as an attachment.

Exceptions
WebServiceException:
if threshold is < 0

Method Detail

getIDback to summary
public String getID()

Implements abstract javax.xml.ws.WebServiceFeature.getID.

Doc from javax.xml.ws.WebServiceFeature.getID.

Get the unique identifier for this WebServiceFeature.

Returns:String

the unique identifier for this feature.

getThresholdback to summary
public int getThreshold()

Gets the threshold value used to determine when binary data should be sent as an attachment.

Returns:int

the current threshold size in bytes