Package adams.flow.dropwizard
Interface RESTProvider
-
- All Superinterfaces:
adams.core.CleanUpHandler,adams.flow.core.FlowContextHandler
- All Known Implementing Classes:
AbstractRESTProvider,EchoServer,GenericServer
public interface RESTProvider extends adams.core.CleanUpHandler, adams.flow.core.FlowContextHandlerInterface for REST webservice providers, i.e., the server side.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcleanUp()Cleans up data structures, frees up memory.adams.core.io.PlaceholderFilegetConfigFile()Returns the YAML config file in use.adams.flow.core.ActorgetFlowContext()Returns the owning actor.booleanisRunning()Returns whether the service is running.voidsetConfigFile(adams.core.io.PlaceholderFile value)Sets the YAML config file to use.voidsetFlowContext(adams.flow.core.Actor value)Sets the actor that executes this webservice.Stringstart()Starts the service.Stringstop()Stops the service.
-
-
-
Method Detail
-
setConfigFile
void setConfigFile(adams.core.io.PlaceholderFile value)
Sets the YAML config file to use.- Parameters:
value- the file
-
getConfigFile
adams.core.io.PlaceholderFile getConfigFile()
Returns the YAML config file in use.- Returns:
- the file
-
setFlowContext
void setFlowContext(adams.flow.core.Actor value)
Sets the actor that executes this webservice.- Specified by:
setFlowContextin interfaceadams.flow.core.FlowContextHandler- Parameters:
value- the owner
-
getFlowContext
adams.flow.core.Actor getFlowContext()
Returns the owning actor.- Specified by:
getFlowContextin interfaceadams.flow.core.FlowContextHandler- Returns:
- the owner
-
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:
cleanUpin interfaceadams.core.CleanUpHandler
-
-