Interface RemoteConnectorService
-
- All Known Implementing Classes:
RemoteConnectorServiceImpl
public interface RemoteConnectorServiceHelper 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RemoteConnectorRequestbuildRequest(java.lang.String url, java.lang.String method)Builds a new Request object, to talk to the given URL with the supplied methodorg.json.simple.JSONObjectexecuteJSONRequest(RemoteConnectorRequest request)Executes the given request, requesting a JSON response, and returns the parsed JSON received backRemoteConnectorResponseexecuteRequest(RemoteConnectorRequest request)Executes the specified request, and return the response.
-
-
-
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
-
executeRequest
RemoteConnectorResponse executeRequest(RemoteConnectorRequest request) throws java.io.IOException, org.alfresco.repo.security.authentication.AuthenticationException, RemoteConnectorClientException, RemoteConnectorServerException
Executes the specified request, and return the response.- Throws:
java.io.IOException- If there was a problem with the communication to the serverorg.alfresco.repo.security.authentication.AuthenticationException- If the authentication details supplied were not acceptedRemoteConnectorClientException- If the server indicates the client request was invalidRemoteConnectorServerException- If the server was itself unable to perform the request
-
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 JSONjava.io.IOExceptionorg.alfresco.repo.security.authentication.AuthenticationException
-
-