Class RatsServer

  • All Implemented Interfaces:
    adams.core.AdditionalInformationHandler, adams.core.CleanUpHandler, adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.SizeOfHandler, adams.flow.core.FlowContextHandler, RESTProvider, RatInputUser, Serializable

    public class RatsServer
    extends GenericServer
    implements RatInputUser
    Generic REST service provider for the RATS framework, which allows you to assemble the REST plugins that should make up the service.
    Automatically sets the flow context of plugins, if they should implement the adams.flow.core.FlowContextHandler interface, and for rat input context, if they should implement the adams.flow.standalone.rats.input.RatInputUser interface.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -url <java.lang.String> (property: URL)
        The URL of the service.
        default: http://localhost:8080/
     
    -in-interceptor <adams.flow.rest.interceptor.incoming.AbstractInInterceptorGenerator> (property: inInterceptor)
        The interceptor to use for incoming messages.
        default: adams.flow.rest.interceptor.incoming.NullGenerator
     
    -out-interceptor <adams.flow.rest.interceptor.outgoing.AbstractOutInterceptorGenerator> (property: outInterceptor)
        The interceptor to use for outgoing messages.
        default: adams.flow.rest.interceptor.outgoing.NullGenerator
     
    -plugin <adams.flow.rest.RESTPlugin> [-plugin ...] (property: plugins)
        The plugins that make up the REST service.
        default: adams.flow.rest.text.RatsTextUpload
     
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_RatInput

        protected RatInput m_RatInput
        the rat input.
    • Constructor Detail

      • RatsServer

        public RatsServer()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Overrides:
        globalInfo in class GenericServer
        Returns:
        a description suitable for displaying in the gui
      • setRatInput

        public void setRatInput​(RatInput value)
        Sets the rat input to use.
        Specified by:
        setRatInput in interface RatInputUser
        Parameters:
        value - the rat input
      • getRatInput

        public RatInput getRatInput()
        Returns the rat input in use.
        Specified by:
        getRatInput in interface RatInputUser
        Returns:
        the rat input, null if none set
      • configurePlugins

        protected void configurePlugins​(RESTPlugin[] plugins)
        For configuring the plugins, e.g., setting the flow context.
        Overrides:
        configurePlugins in class GenericServer
        Parameters:
        plugins - the plugins to configure