Class JaxbElementPayloadMethodProcessor

All Implemented Interfaces:
MethodArgumentResolver, MethodReturnValueHandler

public class JaxbElementPayloadMethodProcessor extends AbstractJaxb2PayloadMethodProcessor
Implementation of MethodArgumentResolver and MethodReturnValueHandler that supports JAXBElement objects.
Since:
2.0
Author:
Arjen Poutsma
  • Constructor Details

    • JaxbElementPayloadMethodProcessor

      public JaxbElementPayloadMethodProcessor()
  • Method Details

    • supportsRequestPayloadParameter

      protected boolean supportsRequestPayloadParameter(org.springframework.core.MethodParameter parameter)
      Description copied from class: AbstractPayloadMethodProcessor
      Indicates whether the given method parameter, annotated with RequestPayload, is supported by this resolver.
      Specified by:
      supportsRequestPayloadParameter in class AbstractPayloadMethodProcessor
      Parameters:
      parameter - the method parameter to check
      Returns:
      true if this resolver supports the supplied parameter; false otherwise
    • resolveArgument

      public jakarta.xml.bind.JAXBElement<?> resolveArgument(MessageContext messageContext, org.springframework.core.MethodParameter parameter) throws jakarta.xml.bind.JAXBException
      Description copied from interface: MethodArgumentResolver
      Resolves the given parameter into a method argument.
      Parameters:
      messageContext - the current message context
      parameter - the parameter to resolve to an argument. This parameter must have previously been passed to the MethodArgumentResolver.supportsParameter(MethodParameter) method of this interface, which must have returned true.
      Returns:
      the resolved argument. May be null.
      Throws:
      jakarta.xml.bind.JAXBException
    • supportsResponsePayloadReturnType

      protected boolean supportsResponsePayloadReturnType(org.springframework.core.MethodParameter returnType)
      Description copied from class: AbstractPayloadMethodProcessor
      Indicates whether the given method return type, annotated with ResponsePayload, is supported.
      Specified by:
      supportsResponsePayloadReturnType in class AbstractPayloadMethodProcessor
      Parameters:
      returnType - the method parameter to check
      Returns:
      true if this resolver supports the supplied return type; false otherwise
    • handleReturnValueInternal

      protected void handleReturnValueInternal(MessageContext messageContext, org.springframework.core.MethodParameter returnType, Object returnValue) throws jakarta.xml.bind.JAXBException
      Specified by:
      handleReturnValueInternal in class AbstractJaxb2PayloadMethodProcessor
      Throws:
      jakarta.xml.bind.JAXBException