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 <> (property: inInterceptor)
        The interceptor to use for incoming messages.
    -out-interceptor <> (property: outInterceptor)
        The interceptor to use for outgoing messages.
    -plugin <> [-plugin ...] (property: plugins)
        The plugins that make up the REST service.
    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
        globalInfo in class GenericServer
        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
        value - the rat input
      • getRatInput

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

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