Celtix User APIs

org.objectweb.celtix.handlers
Interface HandlerInvoker


public interface HandlerInvoker

Invokes the handlers associated with a binding. The client and server bindings invoke their handlers using the HandlerInvoker. For details of how the invokers should be invoked, see the JAXWS 2.0 specification.


Method Summary
 void closeHandlers()
          Close all handlers that have previously invoked
 boolean faultRaised()
          Indicates if a fault has been raised
 ObjectMessageContext getContext()
          get the context associated with this invoker
 boolean invokeLogicalHandlers(boolean requestor)
          Invoke the logical handlers.
 boolean invokeProtocolHandlers(boolean requestor, javax.xml.ws.handler.MessageContext bindingContext)
          Invoke the protocol handlers.
 boolean invokeStreamHandlers(InputStreamMessageContext context)
          Invoke the stream level handlers with an InputStream.
 boolean invokeStreamHandlers(OutputStreamMessageContext context)
          Invoke the stream level handlers with an OutputStream.
 boolean isClosed()
          Indicates that the invoker is closed.
 boolean isInbound()
          Is the current message direction inbound
 boolean isOutbound()
          Is the current message direction outbound
 void mepComplete()
          Invoke handlers at the end of an MEP calling close on each.
 void setContext(ObjectMessageContext ctx)
          assoociate a context with this invoker
 void setFault(boolean faultExpected)
          set the invoker into fault processing mode.
 void setFault(Exception pe)
          set the current exception in this message exchange and set the invoker into fault processing mode.
 void setInbound()
          set the current message direction to inbound
 void setOutbound()
          set the current message direction to outabound
 

Method Detail

invokeLogicalHandlers

boolean invokeLogicalHandlers(boolean requestor)
Invoke the logical handlers.

Parameters:
requestor - true if being invoked on the request initiator

invokeProtocolHandlers

boolean invokeProtocolHandlers(boolean requestor,
                               javax.xml.ws.handler.MessageContext bindingContext)
Invoke the protocol handlers.

Parameters:
requestor - true if being invoked on the request initiator
bindingContext - binding specific MessageContext

invokeStreamHandlers

boolean invokeStreamHandlers(InputStreamMessageContext context)
Invoke the stream level handlers with an InputStream.

Parameters:
context - the InputStreamMessageContext for the message exchange

invokeStreamHandlers

boolean invokeStreamHandlers(OutputStreamMessageContext context)
Invoke the stream level handlers with an OutputStream.

Parameters:
context - the OutputStreamMessageContext for the message exchange

closeHandlers

void closeHandlers()
Close all handlers that have previously invoked


faultRaised

boolean faultRaised()
Indicates if a fault has been raised

Returns:
true if an exception has been thrown by an invoked handler.

isOutbound

boolean isOutbound()
Is the current message direction outbound

Returns:
true if current message direction is outbound

isInbound

boolean isInbound()
Is the current message direction inbound

Returns:
true if current message direction is inbound

setInbound

void setInbound()
set the current message direction to inbound


setOutbound

void setOutbound()
set the current message direction to outabound


setFault

void setFault(Exception pe)
set the current exception in this message exchange and set the invoker into fault processing mode.


setFault

void setFault(boolean faultExpected)
set the invoker into fault processing mode. This method is invoked when a client transport indicates that a fault has been raised by the server but the message has not yet been read or unmarshalled.


mepComplete

void mepComplete()
Invoke handlers at the end of an MEP calling close on each.


isClosed

boolean isClosed()
Indicates that the invoker is closed. When closed, only * #mepComplete 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.


getContext

ObjectMessageContext getContext()
get the context associated with this invoker

Returns:
the associated context

setContext

void setContext(ObjectMessageContext ctx)
assoociate a context with this invoker

Parameters:
ctx - the associated context

Celtix User APIs