This method of the Service Class indicates whether indicates whether the service should be notified when the system shuts down.
public synchronized boolean canShutdown();
Returns true if the service can accept shutdown requests (that is, if getControlsAccepted returns ACCEPT_SHUTDOWN); otherwise, returns false.