public final class MessageUtils extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
getContextualBoolean(Message m,
String key) |
static boolean |
getContextualBoolean(Message m,
String key,
boolean defaultValue) |
static int |
getContextualInteger(Message m,
String key,
int defaultValue) |
static Collection<Integer> |
getContextualIntegers(Message m,
String key,
Collection<Integer> defaultValue) |
static Object |
getContextualProperty(Message m,
String propPreferred,
String propDefault) |
static Set<String> |
getContextualStrings(Message m,
String key,
Set<String> defaultValue) |
static FaultMode |
getFaultMode(Message message)
Determine the fault mode for the underlying (fault) message
(for use on server side only).
|
static int |
getReponseCodeFromMessage(Message message)
Gets the response code from the message and tries to deduct one if it
is not set yet.
|
static Optional<Method> |
getTargetMethod(Message m) |
static boolean |
hasNoResponseContent(Message message)
Determines if the current message has no response content.
|
static boolean |
isDOMPresent(Message m)
Returns true if the underlying content format is a W3C DOM or a SAAJ message.
|
static boolean |
isEmptyPartialResponse(Message message)
Determines if the current message is an empty partial response, which
is a partial response with an empty content.
|
static boolean |
isFault(Message message)
Determine if message is fault.
|
static boolean |
isOneWay(Message message)
Checks if the message is oneway or not
|
static boolean |
isOutbound(Message message)
Determine if message is outbound.
|
static boolean |
isPartialResponse(Message message)
Determine if the current message is a partial response.
|
static boolean |
isRequestor(Message message)
Determine if current messaging role is that of requestor.
|
static boolean |
isTrue(Object value)
Deprecated.
|
public static boolean isOutbound(Message message)
message
- the current Messagepublic static boolean isFault(Message message)
message
- the current Messagepublic static FaultMode getFaultMode(Message message)
message
- the fault messagepublic static boolean isRequestor(Message message)
message
- the current Messagepublic static boolean isPartialResponse(Message message)
message
- the current messagepublic static boolean isEmptyPartialResponse(Message message)
message
- the current message@Deprecated public static boolean isTrue(Object value)
value
- public static boolean getContextualBoolean(Message m, String key, boolean defaultValue)
public static Collection<Integer> getContextualIntegers(Message m, String key, Collection<Integer> defaultValue)
public static int getContextualInteger(Message m, String key, int defaultValue)
public static Set<String> getContextualStrings(Message m, String key, Set<String> defaultValue)
public static Object getContextualProperty(Message m, String propPreferred, String propDefault)
public static boolean isDOMPresent(Message m)
public static int getReponseCodeFromMessage(Message message)
message
- message to get response code frompublic static boolean hasNoResponseContent(Message message)
message
- public static boolean isOneWay(Message message)
message
- the message under considerationApache CXF