Interface RESTProvider

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

    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 Detail

      • 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
      • setInInterceptor

        void setInInterceptor​(AbstractInInterceptorGenerator value)
        Sets the interceptor for incoming messages (actually generator, since interceptors aren't serializable).
        Parameters:
        value - the interceptor
      • getInInterceptor

        AbstractInInterceptorGenerator getInInterceptor()
        Returns the interceptor for incoming messages (actually generator, since interceptors aren't serializable).
        Returns:
        the interceptor
      • setOutInterceptor

        void setOutInterceptor​(AbstractOutInterceptorGenerator value)
        Sets the interceptor for outgoing messages (actually generator, since interceptors aren't serializable).
        Parameters:
        value - the interceptor
      • getOutInterceptor

        AbstractOutInterceptorGenerator getOutInterceptor()
        Returns the interceptor for outgoing messages (actually generator, since interceptors aren't serializable).
        Returns:
        the interceptor
      • getURL

        String getURL()
        Returns the URL used for the service.
        Returns:
        the URL
      • 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