Apache CXF API

org.apache.cxf.jaxws.handler
Class HandlerChainInvoker

java.lang.Object
  extended by org.apache.cxf.jaxws.handler.HandlerChainInvoker

public class HandlerChainInvoker
extends Object

invoke the handlers in a registered handler chain


Constructor Summary
HandlerChainInvoker(List<Handler> hc)
           
HandlerChainInvoker(List<Handler> hc, boolean isOutbound)
           
 
Method Summary
 void adoptLogicalHandlers(HandlerChainInvoker invoker)
          Allows an the logical handler chain for one invoker to be used as an alternate chain for another.
 boolean faultRaised()
           
 Exception getFault()
           
 List<LogicalHandler<?>> getLogicalHandlers()
           
 LogicalMessageContext getLogicalMessageContext()
           
 List<Handler<?>> getProtocolHandlers()
           
 MessageContext getProtocolMessageContext()
           
 boolean invokeLogicalHandlers(boolean requestor, LogicalMessageContext context)
           
 boolean invokeLogicalHandlersHandleFault(boolean requestor, LogicalMessageContext context)
           
 boolean invokeProtocolHandlers(boolean requestor, MessageContext context)
           
 boolean invokeProtocolHandlersHandleFault(boolean requestor, MessageContext context)
           
 boolean isClosed()
          Indicates that the invoker is closed.
 boolean isInbound()
           
 boolean isOutbound()
           
 boolean isRequestor()
          We need HandlerChainInvoker behaves differently on the client and server side.
 boolean isResponseExpected()
           
 void mepComplete(Message message)
          Invoke handlers at the end of an MEP calling close on each.
 void setFault(boolean fe)
           
protected  void setFault(Exception ex)
           
 void setInbound()
           
 void setLogicalMessageContext(LogicalMessageContext mc)
           
 void setOutbound()
           
 void setProtocolMessageContext(MessageContext mc)
           
 void setRequestor(boolean requestor)
           
 void setResponseExpected(boolean expected)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HandlerChainInvoker

public HandlerChainInvoker(List<Handler> hc)

HandlerChainInvoker

public HandlerChainInvoker(List<Handler> hc,
                           boolean isOutbound)
Method Detail

getLogicalHandlers

public List<LogicalHandler<?>> getLogicalHandlers()

getProtocolHandlers

public List<Handler<?>> getProtocolHandlers()

getLogicalMessageContext

public LogicalMessageContext getLogicalMessageContext()

setLogicalMessageContext

public void setLogicalMessageContext(LogicalMessageContext mc)

getProtocolMessageContext

public MessageContext getProtocolMessageContext()

setProtocolMessageContext

public void setProtocolMessageContext(MessageContext mc)

invokeLogicalHandlers

public boolean invokeLogicalHandlers(boolean requestor,
                                     LogicalMessageContext context)

invokeLogicalHandlersHandleFault

public boolean invokeLogicalHandlersHandleFault(boolean requestor,
                                                LogicalMessageContext context)

invokeProtocolHandlers

public boolean invokeProtocolHandlers(boolean requestor,
                                      MessageContext context)

invokeProtocolHandlersHandleFault

public boolean invokeProtocolHandlersHandleFault(boolean requestor,
                                                 MessageContext context)

setResponseExpected

public void setResponseExpected(boolean expected)

isResponseExpected

public boolean isResponseExpected()

isOutbound

public boolean isOutbound()

isInbound

public boolean isInbound()

isRequestor

public boolean isRequestor()
We need HandlerChainInvoker behaves differently on the client and server side. For the client side, as there is no inbound faultChain, we need to call handleFault and close within HandlerChainInvoker directly.


setRequestor

public void setRequestor(boolean requestor)

setInbound

public void setInbound()

setOutbound

public void setOutbound()

faultRaised

public boolean faultRaised()

getFault

public Exception getFault()

setFault

public void setFault(boolean fe)

mepComplete

public void mepComplete(Message message)
Invoke handlers at the end of an MEP calling close on each. The handlers must be invoked in the reverse order that they appear in the handler chain. On the server side this will not be the reverse order in which they were invoked so use the handler chain directly and not simply the invokedHandler list.


isClosed

public boolean isClosed()
Indicates that the invoker is closed. When closed, only

See Also:
may be called. The invoker will become closed if during a invocation of handlers, a handler throws a runtime exception that is not a protocol exception and no futher handler or message processing is possible.

adoptLogicalHandlers

public void adoptLogicalHandlers(HandlerChainInvoker invoker)
Allows an the logical handler chain for one invoker to be used as an alternate chain for another.

Parameters:
invoker - the invoker encalsulting the alternate logical handler chain

setFault

protected final void setFault(Exception ex)

Apache CXF API

Apache CXF