Class GenericServer

  • 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, Serializable
    Direct Known Subclasses:

    public class GenericServer
    extends AbstractRESTProvider
    implements adams.core.AdditionalInformationHandler
    Generic REST service provider, 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.

    -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_Plugins

        protected RESTPlugin[] m_Plugins
        the plugins that make up the server.
    • Constructor Detail

      • GenericServer

        public GenericServer()
    • Method Detail

      • globalInfo

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

        public String getAdditionalInformation()
        Returns the additional information.
        Specified by:
        getAdditionalInformation in interface adams.core.AdditionalInformationHandler
        the additional information, null or 0-length string for no information
      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        defineOptions in class AbstractRESTProvider
      • getDefaultPlugins

        protected RESTPlugin[] getDefaultPlugins()
        Returns the default plugins to use.
        the default
      • setPlugins

        public void setPlugins​(RESTPlugin[] value)
        Sets the REST plugins to use.
        value - the plugins
      • getPlugins

        public RESTPlugin[] getPlugins()
        Returns the REST plugins in use.
        the plugins
      • pluginsTipText

        public String pluginsTipText()
        Returns the tip text for this property.
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • configurePlugins

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

        protected org.apache.cxf.endpoint.Server doStart()
                                                  throws Exception
        Performs the actual start of the service.
        Specified by:
        doStart in class AbstractRESTProvider
        the server instance
        Exception - if start fails