Interface RemoteConnectorService

  • All Known Implementing Classes:
    RemoteConnectorServiceImpl

    public interface RemoteConnectorService
    Helper Service for performing remote web requests from within the repository tier. The default implementation of the service works with HttpClient internally, but other implementations (such as testing loopback) can be used.
    Since:
    4.0.2
    Author:
    Nick Burch
    • Method Detail

      • buildRequest

        RemoteConnectorRequest buildRequest​(java.lang.String url,
                                            java.lang.String method)
        Builds a new Request object, to talk to the given URL with the supplied method
      • executeJSONRequest

        org.json.simple.JSONObject executeJSONRequest​(RemoteConnectorRequest request)
                                               throws java.io.IOException,
                                                      org.alfresco.repo.security.authentication.AuthenticationException,
                                                      org.json.simple.parser.ParseException
        Executes the given request, requesting a JSON response, and returns the parsed JSON received back
        Throws:
        org.json.simple.parser.ParseException - If the response is not valid JSON
        java.io.IOException
        org.alfresco.repo.security.authentication.AuthenticationException