Interface Handler<C extends MessageContext>

All Known Subinterfaces:
LogicalHandler<C>, SOAPHandler<T>

public interface Handler<C extends MessageContext>

The Handler interface is the base interface for JAX-WS handlers.

Since:
JAX-WS 2.0

Methods

Modifier and Type Method and Description
void close(MessageContext context)

Called at the conclusion of a message exchange pattern just prior to the JAX-WS runtime dispatching a message, fault or exception.

boolean handleFault(C context)

The handleFault method is invoked for fault message processing.

boolean handleMessage(C context)

The handleMessage method is invoked for normal processing of inbound and outbound messages.

Methods

handleMessage

boolean handleMessage(C context)

The handleMessage method is invoked for normal processing of inbound and outbound messages. Refer to the description of the handler framework in the JAX-WS specification for full details.

Parameters:
context - the message context.
Returns:
An indication of whether handler processing should continue for the current message
  • Return true to continue processing.
  • Return false to block processing.
Throws:
RuntimeException - Causes the JAX-WS runtime to cease handler processing and generate a fault.
ProtocolException - Causes the JAX-WS runtime to switch to fault message processing.

handleFault

boolean handleFault(C context)

The handleFault method is invoked for fault message processing. Refer to the description of the handler framework in the JAX-WS specification for full details.

Parameters:
context - the message context
Returns:
An indication of whether handler fault processing should continue for the current message
  • Return true to continue processing.
  • Return false to block processing.
Throws:
RuntimeException - Causes the JAX-WS runtime to cease handler fault processing and dispatch the fault.
ProtocolException - Causes the JAX-WS runtime to cease handler fault processing and dispatch the fault.

close

void close(MessageContext context)

Called at the conclusion of a message exchange pattern just prior to the JAX-WS runtime dispatching a message, fault or exception. Refer to the description of the handler framework in the JAX-WS specification for full details.

Parameters:
context - the message context

© 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/javase/8/docs/api/javax/xml/ws/handler/Handler.html