public enum ContentNegotiation extends Enum<ContentNegotiation>
A value of none means 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 pessimistic means 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 optimistic means 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.)
| Type | Property and Description |
|---|---|
static ContentNegotiation |
obtainFromSystem
Obtain the content negotiation value from a system property.
|
| Enum Constant and Description |
|---|
none |
optimistic |
pessimistic |
| Modifier and Type | Field and Description |
|---|---|
static String |
PROPERTY
Property name for content negotiation on
RequestContext. |
| Modifier and Type | Method and Description |
|---|---|
static ContentNegotiation |
obtainFromSystemProperty()
Obtain the content negotiation value from a system property.
|
static ContentNegotiation |
valueOf(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.
|
public static final ContentNegotiation none
public static final ContentNegotiation pessimistic
public static final ContentNegotiation optimistic
This method will never throw a runtime exception.
public static final String PROPERTY
RequestContext.public static ContentNegotiation[] values()
for (ContentNegotiation c : ContentNegotiation.values()) System.out.println(c);
public static ContentNegotiation valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is nullpublic static ContentNegotiation obtainFromSystemProperty()
This method will never throw a runtime exception.
Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.