Interface MessageConverter<I,​O,​C extends EndpointConfiguration>


  • public interface MessageConverter<I,​O,​C extends EndpointConfiguration>
    Message converter interface describes methods for converting a external message type T to the internal message representation and vice versa.
    Since:
    2.0
    Author:
    Christoph Deppisch
    • Method Detail

      • convertOutbound

        O convertOutbound​(Message internalMessage,
                          C endpointConfiguration,
                          TestContext context)
        Converts internal message representation to external message for outbound communication.
        Parameters:
        internalMessage -
        endpointConfiguration -
        context -
        Returns:
      • convertOutbound

        void convertOutbound​(O externalMessage,
                             Message internalMessage,
                             C endpointConfiguration,
                             TestContext context)
        Converts internal message representation to external message for outbound communication. Method receives prepared external message object as parameter argument which is then enriched with information from internal message.
        Parameters:
        externalMessage -
        internalMessage -
        endpointConfiguration -
        context -
      • convertInbound

        Message convertInbound​(I externalMessage,
                               C endpointConfiguration,
                               TestContext context)
        Converts external message to internal representation.
        Parameters:
        externalMessage -
        endpointConfiguration -
        context -
        Returns: