- java.lang.Object
-
- javax.xml.ws.WebServiceFeature
-
- 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, andDispatch
instances on the client side andEndpoint
instances on the server side. This feature cannot be used forService
instance creation on the client side.The following describes the affects of this feature with respect to being enabled or disabled:
- ENABLED: In this Mode, MTOM will be enabled. A receiver MUST accept both a non-optimized and an optimized message, and a sender MAY send an optimized message, or a non-optimized message. The heuristics used by a sender to determine whether to use optimization or not are implementation-specific.
- DISABLED: In this Mode, MTOM will be 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
Fields Modifier and Type Field and Description static String
ID
Constant value identifying the MTOMFeatureprotected int
threshold
Property for MTOM threshold value.-
Fields inherited from class javax.xml.ws.WebServiceFeature
enabled
-
-
Constructor Summary
Constructors Constructor and Description MTOMFeature()
Create anMTOMFeature
.MTOMFeature(boolean enabled)
Creates anMTOMFeature
.MTOMFeature(boolean enabled, int threshold)
Creates anMTOMFeature
.MTOMFeature(int threshold)
Creates anMTOMFeature
.
-
Method Summary
Methods 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
-
-
-
-
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 anMTOMFeature
. The instance created will be enabled.
-
MTOMFeature
public MTOMFeature(boolean enabled)
Creates anMTOMFeature
.- Parameters:
enabled
- specifies if this feature should be enabled or not
-
MTOMFeature
public MTOMFeature(int threshold)
Creates anMTOMFeature
. 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 anMTOMFeature
.- Parameters:
enabled
- specifies if this feature should be enabled or notthreshold
- 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 classWebServiceFeature
- 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
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
22/12/2024 09:07:20 Cette version de la page est en cache (à la date du 22/12/2024 09:07:20) afin d'accélérer le traitement. Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la dernère version de la page.Document créé le 11/06/2005, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/xml/ws/soap/MTOMFeature.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.