Class RESTAllocate

java.lang.Object
ecmwf.ecpds.mover.service.RESTAllocate
All Implemented Interfaces:
AllocateInterface

public final class RESTAllocate extends Object implements AllocateInterface
The Class RESTAllocate.
  • Constructor Details

    • RESTAllocate

      public RESTAllocate(String url, Properties properties) throws IOException
      Instantiates a new allocate manager. At this time the request is sent to the remote site and the outcome is stored in the _json object.
      Parameters:
      url - the url
      properties - the properties
      Throws:
      IOException - the IO exception
  • Method Details

    • get

      public String get(String command) throws ScriptException
      Gets the. Execute the javascript command against the _json object (e.g. json.pathspecs[0]) and expect the outcome to be a String.
      Specified by:
      get in interface AllocateInterface
      Parameters:
      command - the command
      Returns:
      the string
      Throws:
      ScriptException - the script exception
    • commit

      public int commit(String url)
      Commit. Commit. Send the commit request using the url specified. The original _json object is sent within the request.
      Specified by:
      commit in interface AllocateInterface
      Parameters:
      url - the url
      Returns:
      the int