Class DefaultResponseMapper

java.lang.Object
io.fluxcapacitor.javaclient.tracking.handling.DefaultResponseMapper
All Implemented Interfaces:
ResponseMapper

public class DefaultResponseMapper extends Object implements ResponseMapper
A default implementation of the ResponseMapper interface that simply wraps the response in a Message
  • Constructor Details

    • DefaultResponseMapper

      public DefaultResponseMapper()
  • Method Details

    • map

      public Message map(Object response)
      Description copied from interface: ResponseMapper
      Maps the given response object to a Message. The response may be a plain object or a Message.
      Specified by:
      map in interface ResponseMapper
      Parameters:
      response - the response object to be mapped
      Returns:
      a Message representing the response
    • map

      public Message map(Object response, Metadata metadata)
      Description copied from interface: ResponseMapper
      Maps the given response object and metadata to a Message.
      Specified by:
      map in interface ResponseMapper
      Parameters:
      response - the response object to be transformed
      metadata - optional metadata to include in the message
      Returns:
      a Message representing the response and metadata