public final class ContextUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ACTION |
static ObjectFactory |
WSA_OBJECT_FACTORY |
Modifier and Type | Method and Description |
---|---|
static void |
applyReferenceParam(EndpointReferenceType toEpr,
Object el) |
static Destination |
createDecoupledDestination(Exchange exchange,
EndpointReferenceType reference) |
static Message |
createMessage(Exchange exchange)
Create a Binding specific Message.
|
static String |
generateUUID() |
static AttributedURIType |
getAttributedURI(String uri)
Helper method to get an attributed URI.
|
static Conduit |
getConduit(Conduit conduit,
Message message)
Retreive Conduit from Exchange if not already available
|
static JAXBContext |
getJAXBContext()
Retrieve a JAXBContext for marshalling and unmarshalling JAXB generated
types.
|
static String |
getMAPProperty(boolean isRequestor,
boolean isProviderContext,
boolean isOutbound)
Get appropriate property name for message addressing properties.
|
static EndpointReferenceType |
getNoneEndpointReference() |
static RelatesToType |
getRelatesTo(String uri)
Helper method to get a RealtesTo instance.
|
static boolean |
hasEmptyAction(AddressingProperties maps)
Helper method to determine if an MAPs Action is empty (a null action
is considered empty, whereas a zero length action suppresses
the propagation of the Action property).
|
static boolean |
isAnonymousAddress(EndpointReferenceType ref)
Helper method to determine if an EPR address is anon (either null,
anonymous).
|
static boolean |
isFault(Message message)
Determine if message is fault.
|
static boolean |
isGenericAddress(EndpointReferenceType ref)
Helper method to determine if an EPR address is generic (either null,
none or anonymous).
|
static boolean |
isNoneAddress(EndpointReferenceType ref)
Helper method to determine if an EPR address is none.
|
static boolean |
isOutbound(Message message)
Determine if message is outbound.
|
static boolean |
isRequestor(Message message)
Determine if current messaging role is that of requestor.
|
static void |
propogateReceivedMAPs(AddressingProperties inMAPs,
Exchange exchange)
Propagate inbound MAPs onto full reponse & fault messages.
|
static void |
propogateReceivedMAPs(AddressingProperties inMAPs,
Message responseMessage)
Propogate inbound MAPs onto reponse message if applicable
(not applicable for oneways).
|
static boolean |
retrieveAsyncPostResponseDispatch(Message message)
Retrieve indication that an async post-response service invocation
is required.
|
static boolean |
retrieveDeferredUncorrelatedMessageAbort(Message message)
Retrieve indication that a deferred uncorrelated message abort should
occur.
|
static boolean |
retrieveDeferUncorrelatedMessageAbort(Message message)
Retrieve indication that a deferred uncorrelated message abort is
supported
|
static String |
retrieveMAPFaultName(Message message)
Retrieve MAP fault name from the message.
|
static String |
retrieveMAPFaultReason(Message message)
Retrieve MAP fault reason from the message.
|
static AddressingProperties |
retrieveMAPs(Message message,
boolean isProviderContext,
boolean isOutbound) |
static AddressingProperties |
retrieveMAPs(Message message,
boolean isProviderContext,
boolean isOutbound,
boolean warnIfMissing) |
static boolean |
retrievePartialResponseSent(Message message)
Retrieve indication that a partial response has been sent.
|
static void |
setJAXBContext(JAXBContext ctx)
Set the encapsulated JAXBContext (used by unit tests).
|
static void |
storeDeferredUncorrelatedMessageAbort(Message message)
Store indication that a deferred uncorrelated message abort should
occur
|
static void |
storeDeferUncorrelatedMessageAbort(Message message)
Store indication that a deferred uncorrelated message abort is
supported
|
static void |
storeMAPFaultName(String faultName,
Message message)
Store bad MAP fault name in the message.
|
static void |
storeMAPFaultReason(String reason,
Message message)
Store MAP fault reason in the message.
|
static void |
storeMAPs(AddressingProperties maps,
Message message,
boolean isOutbound)
Store MAPs in the message.
|
static void |
storeMAPs(AddressingProperties maps,
Message message,
boolean isOutbound,
boolean isRequestor)
Store MAPs in the message.
|
static void |
storeMAPs(AddressingProperties maps,
Message message,
boolean isOutbound,
boolean isRequestor,
boolean isProviderContext)
Store MAPs in the message.
|
static void |
storePartialResponseSent(Message message)
Store an indication that a partial response has been sent.
|
public static final ObjectFactory WSA_OBJECT_FACTORY
public static final String ACTION
public static boolean isOutbound(Message message)
message
- the current Messagepublic static boolean isFault(Message message)
message
- the current Messagepublic static boolean isRequestor(Message message)
message
- the current Messagepublic static String getMAPProperty(boolean isRequestor, boolean isProviderContext, boolean isOutbound)
isRequestor
- true if the current messaging role is that of
requestorisProviderContext
- true if the binding provider request context
available to the client application as opposed to the message context
visible to handlersisOutbound
- true if the message is outboundpublic static void storeMAPs(AddressingProperties maps, Message message, boolean isOutbound)
message
- the current messageisOutbound
- true if the message is outboundpublic static void storeMAPs(AddressingProperties maps, Message message, boolean isOutbound, boolean isRequestor)
maps
- the MAPs to storemessage
- the current messageisOutbound
- true if the message is outboundisRequestor
- true if the current messaging role is that of requestorpublic static void storeMAPs(AddressingProperties maps, Message message, boolean isOutbound, boolean isRequestor, boolean isProviderContext)
maps
- the MAPs to storemessage
- the current messageisOutbound
- true if the message is outboundisRequestor
- true if the current messaging role is that of requestorisProviderContext
- true if the binding provider request contextpublic static AddressingProperties retrieveMAPs(Message message, boolean isProviderContext, boolean isOutbound)
message
- the current messageisProviderContext
- true if the binding provider request context
available to the client application as opposed to the message context
visible to handlersisOutbound
- true if the message is outboundpublic static AddressingProperties retrieveMAPs(Message message, boolean isProviderContext, boolean isOutbound, boolean warnIfMissing)
message
- the current messageisProviderContext
- true if the binding provider request context
available to the client application as opposed to the message context
visible to handlersisOutbound
- true if the message is outboundwarnIfMissing
- log a warning message if properties cannot be retrievedpublic static AttributedURIType getAttributedURI(String uri)
uri
- the URIpublic static RelatesToType getRelatesTo(String uri)
uri
- the related URIpublic static boolean isGenericAddress(EndpointReferenceType ref)
ref
- the EPR under testpublic static boolean isAnonymousAddress(EndpointReferenceType ref)
ref
- the EPR under testpublic static boolean isNoneAddress(EndpointReferenceType ref)
ref
- the EPR under testpublic static boolean hasEmptyAction(AddressingProperties maps)
maps
- the MAPs Action under testpublic static void propogateReceivedMAPs(AddressingProperties inMAPs, Exchange exchange)
inMAPs
- the inbound MAPsexchange
- the current Exchangepublic static void propogateReceivedMAPs(AddressingProperties inMAPs, Message responseMessage)
inMAPs
- the inbound MAPsresponseMessage
- public static void storeMAPFaultName(String faultName, Message message)
faultName
- the fault name to storemessage
- the current messagepublic static String retrieveMAPFaultName(Message message)
message
- the current messagepublic static void storeMAPFaultReason(String reason, Message message)
reason
- the fault reason to storemessage
- the current messagepublic static String retrieveMAPFaultReason(Message message)
message
- the current messagepublic static void storePartialResponseSent(Message message)
message
- the current messagepublic static boolean retrievePartialResponseSent(Message message)
message
- the current messagepublic static void storeDeferUncorrelatedMessageAbort(Message message)
message
- the current messagepublic static boolean retrieveDeferUncorrelatedMessageAbort(Message message)
message
- the current messagepublic static void storeDeferredUncorrelatedMessageAbort(Message message)
message
- the current messagepublic static boolean retrieveDeferredUncorrelatedMessageAbort(Message message)
message
- the current messagepublic static boolean retrieveAsyncPostResponseDispatch(Message message)
message
- the current messagepublic static JAXBContext getJAXBContext() throws JAXBException
JAXBException
public static void setJAXBContext(JAXBContext ctx) throws JAXBException
ctx
- JAXBContextJAXBException
public static String generateUUID()
public static Conduit getConduit(Conduit conduit, Message message)
conduit
- the current value for the Conduitmessage
- the current messagepublic static EndpointReferenceType getNoneEndpointReference()
public static void applyReferenceParam(EndpointReferenceType toEpr, Object el)
public static Message createMessage(Exchange exchange)
exchange
- the current exchangepublic static Destination createDecoupledDestination(Exchange exchange, EndpointReferenceType reference)
Apache CXF