public class ApplicationPidListener extends Object implements org.springframework.context.ApplicationListener<ApplicationStartedEvent>, org.springframework.core.Ordered
ApplicationListener that saves application PID
into file. This application listener will be triggered exactly once per JVM, and the
file name can be overridden at runtime with a System property or environment variable
named "PIDFILE" (or "pidfile").| Constructor and Description |
|---|
ApplicationPidListener()
Create a new
ApplicationPidListener instance using the filename
'application.pid'. |
ApplicationPidListener(File file)
Create a new
ApplicationPidListener instance with a specified file. |
ApplicationPidListener(String filename)
Create a new
ApplicationPidListener instance with a specified filename. |
public ApplicationPidListener()
ApplicationPidListener instance using the filename
'application.pid'.public ApplicationPidListener(String filename)
ApplicationPidListener instance with a specified filename.filename - the name of file containing pidpublic ApplicationPidListener(File file)
ApplicationPidListener instance with a specified file.file - the file containing pidpublic void onApplicationEvent(ApplicationStartedEvent event)
onApplicationEvent in interface org.springframework.context.ApplicationListener<ApplicationStartedEvent>public void setOrder(int order)
public int getOrder()
getOrder in interface org.springframework.core.OrderedCopyright © 2014 Pivotal Software, Inc.. All rights reserved.