org.apache.ws.addressing.handler
Class AbstractAddressingHandler

java.lang.Object
  extended by javax.xml.rpc.handler.GenericHandler
      extended by org.apache.ws.addressing.handler.AbstractAddressingHandler
All Implemented Interfaces:
javax.xml.rpc.handler.Handler
Direct Known Subclasses:
ClientSideAddressingHandler, ServerSideAddressingHandler

public abstract class AbstractAddressingHandler
extends javax.xml.rpc.handler.GenericHandler

Abstract JAX-RPC Handler containing base WS-Addressing functionality that is used by both client-side and server-side subclasses.

Version:
$Revision: 14 $
Author:
Davanum Srinivas, Ian P. Springer

Field Summary
static java.lang.String CONFIG_PROP_ACTOR
          Configuration property name for the Actor URI.
static java.lang.String CONFIG_PROP_REFERENCE_PROPERTY_NAMES
          Configuration property name for a list of reference property names.
static java.lang.String CONFIG_PROP_REMOVE_HEADERS
          Configuration property name for the "processed header removal" flag.
protected static boolean CONTINUE_HANDLER_CHAIN_PROCESSING
          Constant to be returned by handleRequest(), handleResponse(), and handleFault().
 
Constructor Summary
AbstractAddressingHandler()
           
 
Method Summary
protected  MessageID createMessageID()
          Creates a new random message identifier.
protected  java.lang.String generateUUId()
          This method uses the Java UUID Generator library found through discovery.
protected  java.lang.String getActor()
          Returns the value of the "actor" handler config property.
protected  java.util.Map<java.lang.String,java.lang.String> getHandlerConfigProperties()
          Returns this handler's configuration properties.
protected  java.lang.String getHandlerConfigProperty(java.lang.String propName)
          Returns the value of the specified handler configuration property.
 javax.xml.namespace.QName[] getHeaders()
          Returns a list QNames of the SOAP headers that this handler processes.
protected  java.util.List<javax.xml.namespace.QName> getReferencePropertyQNames()
          Gets the list of processed property names.
 void init(javax.xml.rpc.handler.HandlerInfo handlerInfo)
          Initializes this handler.
protected  void initReferencePropertyQNames()
          Retrieves QNames for reference properties from WSDD and initializes refPropQNames - the list of reference properties that this handler should care about.
protected  boolean isHandlerConfigPropertyTrue(java.lang.String propName)
          Returns true if the value of the specified handler configuration property is "true", or false otherwise.
protected  boolean isMustUnderstandEnabled(javax.xml.rpc.handler.MessageContext msgContext)
          Gets the value of the "MustUnderstandEnabled" field.
protected  boolean isPropertyTrue(javax.xml.rpc.handler.MessageContext msgContext, java.lang.String propName)
          Gets if the specified property has a "true" as its value.
protected  boolean isRemoveHeadersEnabled()
          Returns the value of the "removeHeaders" handler config property.
 
Methods inherited from class javax.xml.rpc.handler.GenericHandler
destroy, handleFault, handleRequest, handleResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_PROP_ACTOR

public static final java.lang.String CONFIG_PROP_ACTOR
Configuration property name for the Actor URI.

See Also:
Constant Field Values

CONFIG_PROP_REFERENCE_PROPERTY_NAMES

public static final java.lang.String CONFIG_PROP_REFERENCE_PROPERTY_NAMES
Configuration property name for a list of reference property names.

See Also:
Constant Field Values

CONFIG_PROP_REMOVE_HEADERS

public static final java.lang.String CONFIG_PROP_REMOVE_HEADERS
Configuration property name for the "processed header removal" flag.

See Also:
Constant Field Values

CONTINUE_HANDLER_CHAIN_PROCESSING

protected static final boolean CONTINUE_HANDLER_CHAIN_PROCESSING
Constant to be returned by handleRequest(), handleResponse(), and handleFault().

See Also:
Constant Field Values
Constructor Detail

AbstractAddressingHandler

public AbstractAddressingHandler()
Method Detail

getHeaders

public javax.xml.namespace.QName[] getHeaders()
Returns a list QNames of the SOAP headers that this handler processes.

Specified by:
getHeaders in interface javax.xml.rpc.handler.Handler
Specified by:
getHeaders in class javax.xml.rpc.handler.GenericHandler
Returns:
Returns a list QNames of the SOAP headers that this handler processes

init

public void init(javax.xml.rpc.handler.HandlerInfo handlerInfo)
Initializes this handler. This handler supports the following configuration properties:

Specified by:
init in interface javax.xml.rpc.handler.Handler
Overrides:
init in class javax.xml.rpc.handler.GenericHandler
Parameters:
handlerInfo - handler info containing handler configuration properties from deployment descriptor

getHandlerConfigProperties

protected java.util.Map<java.lang.String,java.lang.String> getHandlerConfigProperties()
Returns this handler's configuration properties.

Returns:
this handler's configuration properties

getHandlerConfigProperty

protected java.lang.String getHandlerConfigProperty(java.lang.String propName)
Returns the value of the specified handler configuration property.

Parameters:
propName - the name of a configuration property
Returns:
the value of the specified handler configuration property

isHandlerConfigPropertyTrue

protected boolean isHandlerConfigPropertyTrue(java.lang.String propName)
Returns true if the value of the specified handler configuration property is "true", or false otherwise.

Parameters:
propName - the name of a configuration property
Returns:
true if the value of the specified handler configuration property is "true", or false otherwise

generateUUId

protected java.lang.String generateUUId()
This method uses the Java UUID Generator library found through discovery.

Subclasses can optionally override it to use a different UUID generator.

Returns:
A unique identifier

isMustUnderstandEnabled

protected boolean isMustUnderstandEnabled(javax.xml.rpc.handler.MessageContext msgContext)
Gets the value of the "MustUnderstandEnabled" field.

Parameters:
msgContext - Context to get the information from
Returns:
Field value

isPropertyTrue

protected boolean isPropertyTrue(javax.xml.rpc.handler.MessageContext msgContext,
                                 java.lang.String propName)
Gets if the specified property has a "true" as its value.

Parameters:
msgContext - Context to get the information from
propName - Property name
Returns:
true if the property is set to "true"

createMessageID

protected MessageID createMessageID()
                             throws org.apache.axis.types.URI.MalformedURIException
Creates a new random message identifier.

Returns:
The message identifier URI
Throws:
URI.MalformedURIException - If an invalid URI is created

getReferencePropertyQNames

protected java.util.List<javax.xml.namespace.QName> getReferencePropertyQNames()
Gets the list of processed property names.

Returns:
The list of property names

getActor

protected java.lang.String getActor()
Returns the value of the "actor" handler config property.

Returns:
the value of the "actor" handler config property

isRemoveHeadersEnabled

protected boolean isRemoveHeadersEnabled()
Returns the value of the "removeHeaders" handler config property.

Returns:
the value of the "removeHeaders" handler config property

initReferencePropertyQNames

protected void initReferencePropertyQNames()
Retrieves QNames for reference properties from WSDD and initializes refPropQNames - the list of reference properties that this handler should care about.



Copyright © 2008-2009 Rodrigo Ruiz. All Rights Reserved.