Enum ContentNegotiation
- java.lang.Object
-
- java.lang.Enum<ContentNegotiation>
-
- com.sun.xml.ws.client.ContentNegotiation
-
- All Implemented Interfaces:
Serializable,Comparable<ContentNegotiation>
public enum ContentNegotiation extends Enum<ContentNegotiation>
Content negotiation enum.A value of
nonemeans no content negotation at level of the client transport will be performed to negotiate the encoding of XML infoset. The default encoding will always be used.A value of
pessimisticmeans the client transport will assume the default encoding of XML infoset for an outbound message unless informed otherwise by a previously received inbound message. (The client transport initially and pessimistically assumes that a service does not support anything other than the default encoding of XML infoset.)A value of
optimisticmeans the client transport will assume a non-default encoding of XML infoset for an outbound message. (The client transport optimistically assumes that a service supports the non-default encoding of XML infoset.)- Author:
- Paul.Sandoz@Sun.Com
-
-
Enum Constant Summary
Enum Constants Enum Constant Description noneoptimisticpessimistic
-
Field Summary
Fields Modifier and Type Field Description static StringPROPERTYProperty name for content negotiation onRequestContext.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ContentNegotiationobtainFromSystemProperty()Obtain the content negotiation value from a system property.static ContentNegotiationvalueOf(String name)Returns the enum constant of this type with the specified name.static ContentNegotiation[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
none
public static final ContentNegotiation none
-
pessimistic
public static final ContentNegotiation pessimistic
-
optimistic
public static final ContentNegotiation optimistic
-
-
Field Detail
-
PROPERTY
public static final String PROPERTY
Property name for content negotiation onRequestContext.- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static ContentNegotiation[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ContentNegotiation c : ContentNegotiation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ContentNegotiation valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
obtainFromSystemProperty
public static ContentNegotiation obtainFromSystemProperty()
Obtain the content negotiation value from a system property.This method will never throw a runtime exception.
- Returns:
- the content negotiation value.
-
-