Undeploy API proxy with existing threads

Can I catch the trigger of Undeploy API Proxy through the Java Callout code?
I would like to catch this trigger and close all the existing threads. 

2 1 72
1 REPLY 1

No, there is no lifecycle management for Java Callouts. They're expected to be stateless. 

If you have something stateful, you should be running that in an external system - something like Cloud Run or etc.