Class ServiceCaller

java.lang.Object
com.invirgance.convirgance.web.servlet.ServiceCaller

public class ServiceCaller extends Object
Utility class for invoking SelectService instances and returning their results as JSONObjects.
Author:
jbanes
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Iterable<com.invirgance.convirgance.json.JSONObject>
    select(jakarta.servlet.http.HttpServletRequest request, String path, com.invirgance.convirgance.json.JSONObject parameters)
    Uses the service at path, processing the request and returning data.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ServiceCaller

      public ServiceCaller()
  • Method Details

    • select

      public static Iterable<com.invirgance.convirgance.json.JSONObject> select(jakarta.servlet.http.HttpServletRequest request, String path, com.invirgance.convirgance.json.JSONObject parameters)
      Uses the service at path, processing the request and returning data. The service will utilize any relevant request parameters.
      Parameters:
      request - A HttpServletRequest
      path - A path to a service.
      parameters - The requests parameters that will be used by the service.
      Returns:
      An iterable response from the service.
      Throws:
      IllegalArgumentException - if a select service doesn't exist for the path.