org.springframework.context
Class ApplicationEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- ApplicationContextEvent, RequestHandledEvent
public abstract class ApplicationEvent
- extends java.util.EventObject
Class to be extended by all application events. Abstract as it
doesn't make sense for generic events to be published directly.
- Author:
- Rod Johnson, Juergen Hoeller
- See Also:
- Serialized Form
Field Summary |
private static long |
serialVersionUID
use serialVersionUID from Spring 1.2 for interoperability |
private long |
timestamp
System time when the event happened |
Fields inherited from class java.util.EventObject |
source |
Constructor Summary |
ApplicationEvent(java.lang.Object source)
Create a new ApplicationEvent. |
Method Summary |
long |
getTimestamp()
Return the system time in milliseconds when the event happened. |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- use serialVersionUID from Spring 1.2 for interoperability
- See Also:
- Constant Field Values
timestamp
private final long timestamp
- System time when the event happened
ApplicationEvent
public ApplicationEvent(java.lang.Object source)
- Create a new ApplicationEvent.
- Parameters:
source
- the component that published the event (never null
)
getTimestamp
public final long getTimestamp()
- Return the system time in milliseconds when the event happened.