Package adams.flow.rest
Interface RESTProvider
-
- All Superinterfaces:
adams.core.CleanUpHandler,adams.flow.core.FlowContextHandler
- All Known Implementing Classes:
AbstractRESTProvider,EchoServer,GenericServer,GroovyServer,RatsServer
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.flow.core.ActorgetFlowContext()Returns the owning actor.AbstractInInterceptorGeneratorgetInInterceptor()Returns the interceptor for incoming messages (actually generator, since interceptors aren't serializable).AbstractOutInterceptorGeneratorgetOutInterceptor()Returns the interceptor for outgoing messages (actually generator, since interceptors aren't serializable).StringgetURL()Returns the URL used for the service.booleanisRunning()Returns whether the service is running.voidsetFlowContext(adams.flow.core.Actor value)Sets the actor that executes this webservice.voidsetInInterceptor(AbstractInInterceptorGenerator value)Sets the interceptor for incoming messages (actually generator, since interceptors aren't serializable).voidsetOutInterceptor(AbstractOutInterceptorGenerator value)Sets the interceptor for outgoing messages (actually generator, since interceptors aren't serializable).Stringstart()Starts the service.Stringstop()Stops the service.
-
-
-
Method Detail
-
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
-
setInInterceptor
void setInInterceptor(AbstractInInterceptorGenerator value)
Sets the interceptor for incoming messages (actually generator, since interceptors aren't serializable).- Parameters:
value- the interceptor
-
getInInterceptor
AbstractInInterceptorGenerator getInInterceptor()
Returns the interceptor for incoming messages (actually generator, since interceptors aren't serializable).- Returns:
- the interceptor
-
setOutInterceptor
void setOutInterceptor(AbstractOutInterceptorGenerator value)
Sets the interceptor for outgoing messages (actually generator, since interceptors aren't serializable).- Parameters:
value- the interceptor
-
getOutInterceptor
AbstractOutInterceptorGenerator getOutInterceptor()
Returns the interceptor for outgoing messages (actually generator, since interceptors aren't serializable).- Returns:
- the interceptor
-
getURL
String getURL()
Returns the URL used for the service.- Returns:
- the URL
-
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
-
-