org.apache.cxf.ws.rm
Class RMContextUtils

java.lang.Object
  extended by org.apache.cxf.ws.rm.RMContextUtils

public final class RMContextUtils
extends java.lang.Object

Holder for utility methods relating to contexts.


Constructor Summary
protected RMContextUtils()
          Prevents instantiation.
 
Method Summary
static void ensureExposedVersion(org.apache.cxf.ws.addressing.AddressingProperties maps)
          Ensures the appropriate version of WS-Addressing is used.
static java.lang.String generateUUID()
           
static org.apache.cxf.endpoint.Endpoint getEndpoint(org.apache.cxf.message.Message message)
          Returns the endpoint of this message, i.e.
static boolean isAplicationMessage(java.lang.String action)
          Checks if the action String belongs to an application message.
static boolean isOutbound(org.apache.cxf.message.Message message)
          Determine if message is outbound.
static boolean isPartialResponse(org.apache.cxf.message.Message message)
          Checks if the message is a partial response to a oneway request.
static boolean isRequestor(org.apache.cxf.message.Message message)
          Determine if current messaging role is that of requestor.
static boolean isServerSide(org.apache.cxf.message.Message message)
          Determine if message is currently being processed on server side.
static org.apache.cxf.ws.addressing.AddressingPropertiesImpl retrieveMAPs(org.apache.cxf.message.Message message, boolean isProviderContext, boolean isOutbound)
          Retrieves the addressing properties from the current message.
static RMProperties retrieveRMProperties(org.apache.cxf.message.Message message, boolean outbound)
          Retrieve the RM properties from the current message.
static void storeMAPs(org.apache.cxf.ws.addressing.AddressingProperties maps, org.apache.cxf.message.Message message, boolean isProviderContext, boolean isOutbound)
          Store MAPs in the message.
static void storeRMProperties(org.apache.cxf.message.Message message, RMProperties rmps, boolean outbound)
          Store the RM properties in the current message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RMContextUtils

protected RMContextUtils()
Prevents instantiation.

Method Detail

generateUUID

public static java.lang.String generateUUID()
Returns:
a generated UUID

isOutbound

public static boolean isOutbound(org.apache.cxf.message.Message message)
Determine if message is outbound.

Parameters:
message - the current Message
Returns:
true iff the message direction is outbound

isRequestor

public static boolean isRequestor(org.apache.cxf.message.Message message)
Determine if current messaging role is that of requestor.

Parameters:
message - the current Message
Returns:
true iff the current messaging role is that of requestor

isServerSide

public static boolean isServerSide(org.apache.cxf.message.Message message)
Determine if message is currently being processed on server side.

Parameters:
message - the current Message
Returns:
true iff message is currently being processed on server side

isPartialResponse

public static boolean isPartialResponse(org.apache.cxf.message.Message message)
Checks if the message is a partial response to a oneway request.

Parameters:
message - the message
Returns:
true iff the message is a partial response to a oneway request

isAplicationMessage

public static boolean isAplicationMessage(java.lang.String action)
Checks if the action String belongs to an application message.

Parameters:
action - the action
Returns:
true iff the action is not one of the RM protocol actions.

retrieveRMProperties

public static RMProperties retrieveRMProperties(org.apache.cxf.message.Message message,
                                                boolean outbound)
Retrieve the RM properties from the current message.

Parameters:
message - the current message
outbound - true iff the message direction is outbound
Returns:
the RM properties

storeRMProperties

public static void storeRMProperties(org.apache.cxf.message.Message message,
                                     RMProperties rmps,
                                     boolean outbound)
Store the RM properties in the current message.

Parameters:
message - the current message
rmps - the RM properties
outbound - iff the message direction is outbound

retrieveMAPs

public static org.apache.cxf.ws.addressing.AddressingPropertiesImpl retrieveMAPs(org.apache.cxf.message.Message message,
                                                                                 boolean isProviderContext,
                                                                                 boolean isOutbound)
Retrieves the addressing properties from the current message.

Parameters:
message - the current message
isProviderContext - true if the binding provider request context available to the client application as opposed to the message context visible to handlers
isOutbound - true iff the message is outbound
Returns:
the current addressing properties

storeMAPs

public static void storeMAPs(org.apache.cxf.ws.addressing.AddressingProperties maps,
                             org.apache.cxf.message.Message message,
                             boolean isProviderContext,
                             boolean isOutbound)
Store MAPs in the message.

Parameters:
maps - the MAPs to store
message - the current message
isOutbound - true iff the message is outbound
isRequestor - true iff the current messaging role is that of requestor
handler - true if HANDLER scope, APPLICATION scope otherwise

ensureExposedVersion

public static void ensureExposedVersion(org.apache.cxf.ws.addressing.AddressingProperties maps)
Ensures the appropriate version of WS-Addressing is used.

Parameters:
maps - the addressing properties

getEndpoint

public static org.apache.cxf.endpoint.Endpoint getEndpoint(org.apache.cxf.message.Message message)
Returns the endpoint of this message, i.e. the client endpoint if the current messaging role is that of requestor, or the server endpoint otherwise.

Parameters:
message - the current Message
Returns:
the endpoint


Copyright © 2006 Apache Software Foundation. All Rights Reserved.