Class RestServiceDispatcher

java.lang.Object
org.frankframework.http.RestServiceDispatcher

public class RestServiceDispatcher extends Object
Singleton class that knows about the RestListeners that are active.
This class is to be used as a facade for different services that implement the ServiceClient interface.
This class is exposed as a webservice, to be able to provide a single point of entry to all adapters that have a ServiceListener as a IReceiver.
  • Field Details

    • log

      protected org.apache.logging.log4j.Logger log
    • secLog

      protected org.apache.logging.log4j.Logger secLog
  • Constructor Details

    • RestServiceDispatcher

      public RestServiceDispatcher()
  • Method Details

    • getInstance

      public static RestServiceDispatcher getInstance()
    • findMatchingPattern

      public String findMatchingPattern(String uri)
    • getMethodConfig

      public Map<String,Object> getMethodConfig(String matchingPattern, String method)
    • getAvailableMethods

      public List<String> getAvailableMethods(String matchingPattern)
    • dispatchRequest

      public Message dispatchRequest(String restPath, String uri, javax.servlet.http.HttpServletRequest httpServletRequest, String contentType, String request, PipeLineSession context, javax.servlet.http.HttpServletResponse httpServletResponse, javax.servlet.ServletContext servletContext) throws ListenerException
      Dispatch a request.
      Parameters:
      uri - the name of the IReceiver object
      request - the String with the request/input
      Returns:
      String with the result of processing the request through the serviceName
      Throws:
      ListenerException
    • registerServiceClient

      public void registerServiceClient(ServiceClient listener, String uriPattern, String method, String etagSessionKey, String contentTypeSessionKey, boolean validateEtag)
    • unregisterServiceClient

      public void unregisterServiceClient(String uriPattern, String method)
    • getUriPatterns

      public Set<String> getUriPatterns()