java.lang.Object
com.aquima.interactions.communication.impl.evaluator.parser.RestParser

public final class RestParser extends Object
Rest parser to parse a rest message and fill the profile with data.
Since:
9.0
Author:
Jon van Leuven, Arjan Pragt, Nicky van Noorloos, Munish Mahabiersing
  • Constructor Details

  • Method Details

    • matchOperation

      public IRestOperationDefinition matchOperation(IRestRequestMessage request)
      This method matches the urn of a request to an operation of the service.
      Parameters:
      request - The incoming rest request message.
      Returns:
      The definition of the operation.
      Throws:
      UnmatchableOperationException - When no operation can be matched to the urn/
    • parseRequest

      public void parseRequest(String operationName, IRestRequestMessage request, InferenceContext profile, IDebugger debugger) throws MessageParseException
      This method may be used to parse a rest request message.
      Parameters:
      operationName - The operation name, may not be null or empty.
      request - The rest request message, may not be null.
      profile - The destination profile, may not be null.
      debugger - A debugger instance that is attached, may be null.
      Throws:
      MessageParseException - when parsing the request fails.
    • parseResponse

      public void parseResponse(String operationName, IRestMessage response, InferenceContext profile, IDebugger debugger) throws MessageParseException
      This method may be used to parse a rest response message.
      Parameters:
      operationName - The operation name, may not be null or empty.
      response - the response to parse, may not be null.
      profile - The destination profile, may not be null.
      debugger - A debugger instance that is attached, may be null.
      Throws:
      MessageParseException - when parsing the response failed.