How to remove all custom request handlers

0
Hello, I've registered few custom request handlers using Core.addRequestHandler() method But I don't see any method that removes request handler How can I remove my registered request handlers?
asked
3 answers
0

Petro,

I believe what Andrej is saying, request handlers are started during the start up of the application. When the application is stopped, all of the request handlers will be stopped as well. If you want to remove a request handler, you would have to take out the "Core.addRequestHandler()" code, and redeploy.

 

Edit: I dont think you can stop a request handler on the fly. Instead, it might be better to create a configuration table in your domain model. In your request handler you can retrieve that configuration to see if the request handler is supposed to be "on" or "off", and then proceed accordingly. 

answered
0

May be this stackoverflow could help you: https://stackoverflow.com/questions/10270520/how-to-dynamically-map-urls-to-java-servlet-handlers-based-on-their-names-goog

Regards,

Ronald

 

answered
-1

Isn't it good enough if you replace an existing RequestHandler with a dummy implementation that does nothing, instead of removing it completely?

answered