in app/eventgenerator/src/main/java/com/googlecodesamples/cloud/jss/eventgenerator/service/EventPublisherService.java [95:109]
public synchronized void shutdown() {
logger.info("shutting down the thread pool and timer for EventPublisherService");
if (executor == null) {
closeTimer();
return;
}
// Shut down the thread pool and timer and reset the number of message received.
try {
executor.shutdownNow();
} finally {
closeTimer();
resetTotalMessage();
}
}