Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.webservice.handler
Class HandlerChainBaseImpl

    java.lang.Object
      org.jboss.webservice.handler.HandlerChainBaseImpl

All Implemented Interfaces:
  Collection, javax.xml.rpc.handler.HandlerChain, List

Direct Known Subclasses:
  ClientHandlerChain, ServerHandlerChain

public abstract class HandlerChainBaseImpl
extends Object
implements javax.xml.rpc.handler.HandlerChain

Represents a list of handlers. All elements in the HandlerChain are of the type javax.xml.rpc.handler.Handler.

Abstracts the policy and mechanism for the invocation of the registered handlers.

Since:
  06-May-2004
Author:
  Thomas.Diesler@jboss.org

Field Summary
`protected int` | `falseIndex`
`protected ArrayList` | `handlers`
`protected HashSet` | `roles`
`protected int` | `state`
`static int` | `STATE_CREATED`
`static int` | `STATE_DESTROYED`
`static int` | `STATE_DOES_NOT_EXIST`
`static int` | `STATE_READY`

Constructor Summary
`HandlerChainBaseImpl(List infos, Set roles)` Constructs a handler chain with the given handlers infos

Method Summary
`void` | `add(int index, Object element)`
`boolean` | `add(Object o)`
`boolean` | `addAll(Collection c)`
`boolean` | `addAll(int index, Collection c)`
`protected void` | `checkMustUnderstand(javax.xml.rpc.handler.MessageContext msgContext)` Check if there are mustUnderstand headers that were not processed
`void` | `clear()`
`boolean` | `contains(Object elem)`
`boolean` | `containsAll(Collection c)`
`void` | `destroy()` Indicates the end of lifecycle for a HandlerChain.
`boolean` | `equals(Object o)`
`Object` | `get(int index)`
`protected javax.xml.rpc.handler.Handler` | `getHandlerAt(int pos)` Get the handler at the requested position
`String[]` | `getRoles()` Gets SOAP actor roles registered for this HandlerChain at this SOAP node.
`int` | `getState()` Get the state of this handler chain
`boolean` | `handleFault(javax.xml.rpc.handler.MessageContext msgContext)` Initiates the SOAP fault processing for this handler chain.
`boolean` | `handleRequest(javax.xml.rpc.handler.MessageContext msgContext)` Initiates the request processing for this handler chain.
`boolean` | `handleResponse(javax.xml.rpc.handler.MessageContext msgContext)` Initiates the response processing for this handler chain.
`int` | `hashCode()`
`int` | `indexOf(Object elem)`
`void` | `init(Map config)` Initializes the configuration for a HandlerChain.
`boolean` | `isEmpty()`
`Iterator` | `iterator()`
`int` | `lastIndexOf(Object elem)`
`ListIterator` | `listIterator()`
`ListIterator` | `listIterator(int index)`
`Object` | `remove(int index)`
`boolean` | `remove(Object o)`
`boolean` | `removeAll(Collection c)`
`protected void` | `replaceDirtyHandlers()` Replace handlers that did not survive the previous call
`boolean` | `retainAll(Collection c)`
`Object` | `set(int index, Object element)`
`void` | `setRoles(String[] soapActorNames)` Sets SOAP Actor roles for this HandlerChain.
`int` | `size()`
`List` | `subList(int fromIndex, int toIndex)`
`Object[]` | `toArray()`
`Object[]` | `toArray(Object[] a)`
`protected String` | `traceSOAPPart(javax.xml.soap.SOAPPart soapPart, String lastMessageTrace)` Trace the SOAPPart, do nothing if the String representation is equal to the last one.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### STATE_DOES_NOT_EXIST

    public static final int STATE_DOES_NOT_EXIST

See Also:
  Constant Field Values

### STATE_CREATED

    public static final int STATE_CREATED

See Also:
  Constant Field Values

### STATE_READY

    public static final int STATE_READY

See Also:
  Constant Field Values

### STATE_DESTROYED

    public static final int STATE_DESTROYED

See Also:
  Constant Field Values

### handlers

    protected ArrayList handlers

### roles

    protected HashSet roles

### falseIndex

    protected int falseIndex

### state

    protected int state

Constructor Detail

### HandlerChainBaseImpl

    public HandlerChainBaseImpl(List infos,
                                Set roles)

  Constructs a handler chain with the given handlers infos

Method Detail

### getState

    public int getState()

  Get the state of this handler chain

### init

    public void init(Map config)

  Initializes the configuration for a HandlerChain.

  Specified by:
    `init` in interface `javax.xml.rpc.handler.HandlerChain`
  Parameters:
    `config` - Configuration for the initialization of this handler chain
  Throws:
    `javax.xml.rpc.JAXRPCException` - If any error during initialization

### destroy

    public void destroy()

  Indicates the end of lifecycle for a HandlerChain.

  Specified by:
    `destroy` in interface `javax.xml.rpc.handler.HandlerChain`
  Throws:
    `javax.xml.rpc.JAXRPCException` - If any error during destroy

### getRoles

    public String[] getRoles()

  Gets SOAP actor roles registered for this HandlerChain at this SOAP node. The returned array includes the special SOAP actor next.

  Specified by:
    `getRoles` in interface `javax.xml.rpc.handler.HandlerChain`
  Returns:
    SOAP Actor roles as URIs

### setRoles

    public void setRoles(String[] soapActorNames)

  Sets SOAP Actor roles for this HandlerChain. This specifies the set of roles in which this HandlerChain is to act for the SOAP message processing at this SOAP node. These roles assumed by a HandlerChain must be invariant during the processing of an individual SOAP message through the HandlerChain.

  A HandlerChain always acts in the role of the special SOAP actor next. Refer to the SOAP specification for the URI name for this special SOAP actor. There is no need to set this special role using this method.

  Specified by:
    `setRoles` in interface `javax.xml.rpc.handler.HandlerChain`
  Parameters:
    `soapActorNames` - URIs for SOAP actor name

### handleRequest

    public boolean handleRequest(javax.xml.rpc.handler.MessageContext msgContext)

  Initiates the request processing for this handler chain.

  Specified by:
    `handleRequest` in interface `javax.xml.rpc.handler.HandlerChain`
  Parameters:
    `msgContext` - MessageContext parameter provides access to the request SOAP message.
  Returns:
    Returns true if all handlers in chain have been processed. Returns false if a handler in the chain returned false from its handleRequest method.
  Throws:
    `javax.xml.rpc.JAXRPCException` - if any processing error happens

### handleResponse

    public boolean handleResponse(javax.xml.rpc.handler.MessageContext msgContext)

  Initiates the response processing for this handler chain.

  In this implementation, the response handler chain starts processing from the same Handler instance (that returned false) and goes backward in the execution sequence.

  Specified by:
    `handleResponse` in interface `javax.xml.rpc.handler.HandlerChain`
  Returns:
    Returns true if all handlers in chain have been processed. Returns false if a handler in the chain returned false from its handleResponse method.
  Throws:
    `javax.xml.rpc.JAXRPCException` - if any processing error happens

### handleFault

    public boolean handleFault(javax.xml.rpc.handler.MessageContext msgContext)

  Initiates the SOAP fault processing for this handler chain.

  In this implementation, the fault handler chain starts processing from the same Handler instance (that returned false) and goes backward in the execution sequence.

  Specified by:
    `handleFault` in interface `javax.xml.rpc.handler.HandlerChain`
  Returns:
    Returns true if all handlers in chain have been processed. Returns false if a handler in the chain returned false from its handleFault method.
  Throws:
    `javax.xml.rpc.JAXRPCException` - if any processing error happens

### traceSOAPPart

    protected String traceSOAPPart(javax.xml.soap.SOAPPart soapPart,
                                   String lastMessageTrace)

  Trace the SOAPPart, do nothing if the String representation is equal to the last one.

### replaceDirtyHandlers

    protected void replaceDirtyHandlers()

  Replace handlers that did not survive the previous call

### getHandlerAt

    protected javax.xml.rpc.handler.Handler getHandlerAt(int pos)

  Get the handler at the requested position

### checkMustUnderstand

    protected void checkMustUnderstand(javax.xml.rpc.handler.MessageContext msgContext)

  Check if there are mustUnderstand headers that were not processed

### remove

    public boolean remove(Object o)

  Specified by:
    `remove` in interface `List`

### containsAll

    public boolean containsAll(Collection c)

  Specified by:
    `containsAll` in interface `List`

### removeAll

    public boolean removeAll(Collection c)

  Specified by:
    `removeAll` in interface `List`

### retainAll

    public boolean retainAll(Collection c)

  Specified by:
    `retainAll` in interface `List`

### hashCode

    public int hashCode()

  Specified by:
    `hashCode` in interface `List`

### equals

    public boolean equals(Object o)

  Specified by:
    `equals` in interface `List`

### iterator

    public Iterator iterator()

  Specified by:
    `iterator` in interface `List`

### subList

    public List subList(int fromIndex,
                        int toIndex)

  Specified by:
    `subList` in interface `List`

### listIterator

    public ListIterator listIterator()

  Specified by:
    `listIterator` in interface `List`

### listIterator

    public ListIterator listIterator(int index)

  Specified by:
    `listIterator` in interface `List`

### size

    public int size()

  Specified by:
    `size` in interface `List`

### clear

    public void clear()

  Specified by:
    `clear` in interface `List`

### isEmpty

    public boolean isEmpty()

  Specified by:
    `isEmpty` in interface `List`

### toArray

    public Object[] toArray()

  Specified by:
    `toArray` in interface `List`

### get

    public Object get(int index)

  Specified by:
    `get` in interface `List`

### remove

    public Object remove(int index)

  Specified by:
    `remove` in interface `List`

### add

    public void add(int index,
                    Object element)

  Specified by:
    `add` in interface `List`

### indexOf

    public int indexOf(Object elem)

  Specified by:
    `indexOf` in interface `List`

### lastIndexOf

    public int lastIndexOf(Object elem)

  Specified by:
    `lastIndexOf` in interface `List`

### add

    public boolean add(Object o)

  Specified by:
    `add` in interface `List`

### contains

    public boolean contains(Object elem)

  Specified by:
    `contains` in interface `List`

### addAll

    public boolean addAll(int index,
                          Collection c)

  Specified by:
    `addAll` in interface `List`

### addAll

    public boolean addAll(Collection c)

  Specified by:
    `addAll` in interface `List`

### set

    public Object set(int index,
                      Object element)

  Specified by:
    `set` in interface `List`

### toArray

    public Object[] toArray(Object[] a)

  Specified by:
    `toArray` in interface `List`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.