I’m new to server-side development and have been experimenting with the Play framework recently. And I’m curious to know if there is an equivalent of ServletContextListener in Play. I found an Application class and a Plugin class from the Javadocs.
I want to start a bluetooth server from my web application when it starts and want to shut it down when the web app quits.
Many thanks in advance.
Take a look at the Global object: start your bluetooth server to the
onStart()method, and stop it in theonStop()method.This
Globalclass must be located in the root of yourappfolder.