Interface RESTProvider

  • All Superinterfaces:
    adams.core.CleanUpHandler, adams.flow.core.FlowContextHandler
    All Known Implementing Classes:
    AbstractRESTProvider, EchoServer, GenericServer

    public interface RESTProvider
    extends adams.core.CleanUpHandler, adams.flow.core.FlowContextHandler
    Interface for REST webservice providers, i.e., the server side.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void cleanUp()
      Cleans up data structures, frees up memory.
      adams.core.io.PlaceholderFile getConfigFile()
      Returns the YAML config file in use.
      adams.flow.core.Actor getFlowContext()
      Returns the owning actor.
      boolean isRunning()
      Returns whether the service is running.
      void setConfigFile​(adams.core.io.PlaceholderFile value)
      Sets the YAML config file to use.
      void setFlowContext​(adams.flow.core.Actor value)
      Sets the actor that executes this webservice.
      String start()
      Starts the service.
      String stop()
      Stops the service.
    • Method Detail

      • setConfigFile

        void setConfigFile​(adams.core.io.PlaceholderFile value)
        Sets the YAML config file to use.
        Parameters:
        value - the file
      • getConfigFile

        adams.core.io.PlaceholderFile getConfigFile()
        Returns the YAML config file in use.
        Returns:
        the file
      • setFlowContext

        void setFlowContext​(adams.flow.core.Actor value)
        Sets the actor that executes this webservice.
        Specified by:
        setFlowContext in interface adams.flow.core.FlowContextHandler
        Parameters:
        value - the owner
      • getFlowContext

        adams.flow.core.Actor getFlowContext()
        Returns the owning actor.
        Specified by:
        getFlowContext in interface adams.flow.core.FlowContextHandler
        Returns:
        the owner
      • start

        String start()
        Starts the service.
        Returns:
        null if successful, otherwise error message
      • isRunning

        boolean isRunning()
        Returns whether the service is running.
        Returns:
        true if running
      • stop

        String stop()
        Stops the service.
        Returns:
        null if successful, otherwise error message
      • cleanUp

        void cleanUp()
        Cleans up data structures, frees up memory.
        Specified by:
        cleanUp in interface adams.core.CleanUpHandler