I have a Spring Neo4J server
I want to have an endpoint in this server that starts a thread to save tweets of a twitterstream to the neo4j database.
I also want to have an endpoint that stops this thread.
Is the best way to do this through the TaskExecutor
object, or should I create a Runnable
object and save it to the service bean, that I can interact with?
How would I do this in the context of a rest API endpoint in my Spring Data server?