Package jakarta.xml.ws.handler
Interface Handler<C extends MessageContext>
- Type Parameters:
C- message context
- All Known Subinterfaces:
LogicalHandler<C>,SOAPHandler<T>
public interface Handler<C extends MessageContext>
The
Handler interface
is the base interface for Jakarta XML Web Services handlers.- Since:
- 1.6, JAX-WS 2.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose(MessageContext context) Called at the conclusion of a message exchange pattern just prior to the Jakarta XML Web Services runtime dispatching a message, fault or exception.booleanhandleFault(C context) ThehandleFaultmethod is invoked for fault message processing.booleanhandleMessage(C context) ThehandleMessagemethod is invoked for normal processing of inbound and outbound messages.
-
Method Details
-
handleMessage
ThehandleMessagemethod is invoked for normal processing of inbound and outbound messages. Refer to the description of the handler framework in the Jakarta XML Web Services specification for full details.- Parameters:
context- the message context.- Returns:
- An indication of whether handler processing should continue for
the current message
- Return
trueto continue processing. - Return
falseto block processing.
- Return
- Throws:
RuntimeException- Causes the Jakarta XML Web Services runtime to cease handler processing and generate a fault.ProtocolException- Causes the Jakarta XML Web Services runtime to switch to fault message processing.
-
handleFault
ThehandleFaultmethod is invoked for fault message processing. Refer to the description of the handler framework in the Jakarta XML Web Services specification for full details.- Parameters:
context- the message context- Returns:
- An indication of whether handler fault processing should continue
for the current message
- Return
trueto continue processing. - Return
falseto block processing.
- Return
- Throws:
RuntimeException- Causes the Jakarta XML Web Services runtime to cease handler fault processing and dispatch the fault.ProtocolException- Causes the Jakarta XML Web Services runtime to cease handler fault processing and dispatch the fault.
-
close
Called at the conclusion of a message exchange pattern just prior to the Jakarta XML Web Services runtime dispatching a message, fault or exception. Refer to the description of the handler framework in the Jakarta XML Web Services specification for full details.- Parameters:
context- the message context
-