Package adams.flow.rest
Class RatsServer
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.rest.AbstractRESTProvider
-
- adams.flow.rest.GenericServer
-
- adams.flow.rest.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 Summary
Fields Modifier and Type Field Description protected RatInputm_RatInputthe rat input.-
Fields inherited from class adams.flow.rest.GenericServer
m_Plugins
-
Fields inherited from class adams.flow.rest.AbstractRESTProvider
m_InInterceptor, m_OutInterceptor, m_Owner, m_Running, m_Server, m_URL
-
-
Constructor Summary
Constructors Constructor Description RatsServer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconfigurePlugins(RESTPlugin[] plugins)For configuring the plugins, e.g., setting the flow context.protected RESTPlugin[]getDefaultPlugins()Returns the default plugins to use.RatInputgetRatInput()Returns the rat input in use.StringglobalInfo()Returns a string describing the object.voidsetRatInput(RatInput value)Sets the rat input to use.-
Methods inherited from class adams.flow.rest.GenericServer
defineOptions, doStart, getAdditionalInformation, getDefaultURL, getPlugins, pluginsTipText, setPlugins
-
Methods inherited from class adams.flow.rest.AbstractRESTProvider
check, cleanUp, configureInterceptors, configureTLS, doStop, getDefaultInInterceptor, getDefaultOutInterceptor, getFlowContext, getInInterceptor, getOutInterceptor, getURL, inInterceptorTipText, isRunning, log, outInterceptorTipText, setFlowContext, setInInterceptor, setOutInterceptor, setURL, start, stop, URLTipText
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_RatInput
protected RatInput m_RatInput
the rat input.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Overrides:
globalInfoin classGenericServer- Returns:
- a description suitable for displaying in the gui
-
getDefaultPlugins
protected RESTPlugin[] getDefaultPlugins()
Returns the default plugins to use.- Overrides:
getDefaultPluginsin classGenericServer- Returns:
- the default
-
setRatInput
public void setRatInput(RatInput value)
Sets the rat input to use.- Specified by:
setRatInputin interfaceRatInputUser- Parameters:
value- the rat input
-
getRatInput
public RatInput getRatInput()
Returns the rat input in use.- Specified by:
getRatInputin interfaceRatInputUser- 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:
configurePluginsin classGenericServer- Parameters:
plugins- the plugins to configure
-
-