org.jboss.webservice.handler
Class ServerHandlerChain

java.lang.Object
  extended byorg.jboss.webservice.handler.HandlerChainBaseImpl (src) 
      extended byorg.jboss.webservice.handler.ServerHandlerChain
All Implemented Interfaces:
java.util.Collection, HandlerChain (src) , java.util.List

public class ServerHandlerChain
extends HandlerChainBaseImpl (src)

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

Field Summary
 
Fields inherited from class org.jboss.webservice.handler.HandlerChainBaseImpl (src)
falseIndex, handlers, roles, state, STATE_CREATED, STATE_DESTROYED, STATE_DOES_NOT_EXIST, STATE_READY
 
Constructor Summary
ServerHandlerChain(java.util.List infos, java.util.Set roles)
           
 
Method Summary
 boolean handleRequest(MessageContext (src)  msgContext)
          Gets the RPCInvocation before the the server handler chain is invoked, gets it again after handler processing and replaces it in the message contaxt in case the handlers modified the request SOAPEnvelope.
 boolean handleResponse(MessageContext (src)  msgContext)
          Initiates the response processing for this handler chain.
 
Methods inherited from class org.jboss.webservice.handler.HandlerChainBaseImpl (src)
add, add, addAll, addAll, checkMustUnderstand, clear, contains, containsAll, destroy, equals, get, getHandlerAt, getRoles, getState, handleFault, hashCode, indexOf, init, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceDirtyHandlers, retainAll, set, setRoles, size, subList, toArray, toArray, traceSOAPPart
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerHandlerChain

public ServerHandlerChain(java.util.List infos,
                          java.util.Set roles)
Method Detail

handleRequest

public boolean handleRequest(MessageContext (src)  msgContext)
Gets the RPCInvocation before the the server handler chain is invoked, gets it again after handler processing and replaces it in the message contaxt in case the handlers modified the request SOAPEnvelope.

Specified by:
handleRequest in interface HandlerChain (src)
Overrides:
handleRequest in class HandlerChainBaseImpl (src)
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.

handleResponse

public boolean handleResponse(MessageContext (src)  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 HandlerChain (src)
Overrides:
handleResponse in class HandlerChainBaseImpl (src)
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:
JAXRPCException (src) - if any processing error happens