Class RemoteTransformerClient

java.lang.Object
org.alfresco.repo.content.transform.RemoteTransformerClient

public class RemoteTransformerClient extends Object
Client class that transfers content (from a ContentReader) to a remote transformation agent together with request parameters that will be used to transform the content. The transformed content is then returned and saved in a ContentWriter. In the event of an error an Exception is thrown.
Since:
6.0
  • Constructor Details

    • RemoteTransformerClient

      public RemoteTransformerClient(String name, String baseUrl, org.alfresco.httpclient.HttpClientConfig httpClientConfig)
  • Method Details

    • setStartupRetryPeriodSeconds

      public void setStartupRetryPeriodSeconds(int startupRetryPeriodSeconds)
    • getBaseUrl

      public String getBaseUrl()
    • request

      public void request(ContentReader reader, ContentWriter writer, String sourceMimetype, String sourceExtension, String targetExtension, long timeoutMs, org.apache.commons.logging.Log logger, String... args)
    • check

      public Pair<Boolean,String> check(org.apache.commons.logging.Log logger)
      Indicates if a remote transform: a) ready probe has ever indicated success new Pair<>(true, <version string>), b) a ready probe has just failed new Pair<>(false, <error string>), or c) we are not performing a ready check as we have just done one new Pair<>(null, null).
    • check

      public static Pair<Boolean,String> check(org.alfresco.util.exec.RuntimeExec checkCommand)
      Helper method that returns the same result type as check(Log) given a local checkCommand.
    • isAvailable

      public boolean isAvailable()