Hi,

Since your goal is to "do some action before the termination of the lightsreamer", I will answer to a slightly different question, that is:
"Is there anyway to detect if the lightstreamer service is about to terminate (obviously in case of a graceful shutdown)"?
The Server does not provide a callback to notify this; it just logs "Server shutdown requested".
We lean on the JVM support for the "shutdown hooks".
More details in this thread.