Spec-Zone .ru
спецификации, руководства, описания, API
Please note that the specifications and other information contained herein are not final and are subject to change. The information is being made available to you solely for purpose of evaluation.

Java™ Platform
Standard Ed. 7

DRAFT ea-b118

javax.xml.ws.soap
Class MTOMFeature

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

public final class MTOMFeature
extends WebServiceFeature

This feature represents the use of MTOM with a web service. This feature can be used during the creation of SEI proxy, and 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:
JAX-WS 2.1

Field Summary
Modifier and Type Field and Description
static String ID
          Constant value identifying the MTOMFeature
protected  int threshold
          Property for MTOM threshold value.
 
Fields inherited from class javax.xml.ws.WebServiceFeature
enabled
 
Constructor Summary
Constructor and Description
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
Modifier and Type Method and Description
 String getID()
          Get the unique identifier for this WebServiceFeature.
 int getThreshold()
          Gets the threshold value used to determine when binary data should be sent as an attachment.
 
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 MTOMFeature

See Also:
Constant Field Values

threshold

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

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 SHOULD be before being sent as an attachment.
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 SHOULD be before being sent as an attachment.
Throws:
WebServiceException - if threshold is < 0
Method Detail

getID

public 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 sent as an attachment.

Returns:
the current threshold size in bytes

Java™ Platform
Standard Ed. 7

DRAFT ea-b118

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Copyright © 1993, 2010, Oracle Corporation. All rights reserved.
DRAFT ea-b118

Scripting on this page tracks web page traffic, but does not change the content in any way.