diff --git a/spring-context/src/main/java/org/springframework/context/ApplicationEvent.java b/spring-context/src/main/java/org/springframework/context/ApplicationEvent.java index c1d99b2353edc3d44e19804f91827b821abd695f..488f75a11d61d1e9f00915f39775600c776717fe 100644 --- a/spring-context/src/main/java/org/springframework/context/ApplicationEvent.java +++ b/spring-context/src/main/java/org/springframework/context/ApplicationEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,8 @@ import java.util.EventObject; * * @author Rod Johnson * @author Juergen Hoeller + * @see org.springframework.context.ApplicationListener + * @see org.springframework.context.event.EventListener */ public abstract class ApplicationEvent extends EventObject { @@ -35,8 +37,9 @@ public abstract class ApplicationEvent extends EventObject { /** - * Create a new ApplicationEvent. - * @param source the object on which the event initially occurred (never {@code null}) + * Create a new {@code ApplicationEvent}. + * @param source the object on which the event initially occurred or with + * which the event is associated (never {@code null}) */ public ApplicationEvent(Object source) { super(source); @@ -45,7 +48,7 @@ public abstract class ApplicationEvent extends EventObject { /** - * Return the system time in milliseconds when the event happened. + * Return the system time in milliseconds when the event occurred. */ public final long getTimestamp() { return this.timestamp; diff --git a/spring-context/src/main/java/org/springframework/context/ApplicationEventPublisher.java b/spring-context/src/main/java/org/springframework/context/ApplicationEventPublisher.java index 43b8dd40bc847dc7fde2c1cef9e8734cbdb62ca5..d21af114e99820d87433d125bff79e771180c9d8 100644 --- a/spring-context/src/main/java/org/springframework/context/ApplicationEventPublisher.java +++ b/spring-context/src/main/java/org/springframework/context/ApplicationEventPublisher.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,8 @@ package org.springframework.context; /** * Interface that encapsulates event publication functionality. - * Serves as super-interface for {@link ApplicationContext}. + * + *
Serves as a super-interface for {@link ApplicationContext}. * * @author Juergen Hoeller * @author Stephane Nicoll diff --git a/spring-context/src/main/java/org/springframework/context/ApplicationListener.java b/spring-context/src/main/java/org/springframework/context/ApplicationListener.java index 8cb0262f07957429360cd4d3ff7b22aecdcc7d90..ccf60fd633798c1068d9007f579a36d1a441e892 100644 --- a/spring-context/src/main/java/org/springframework/context/ApplicationListener.java +++ b/spring-context/src/main/java/org/springframework/context/ApplicationListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,18 +20,21 @@ import java.util.EventListener; /** * Interface to be implemented by application event listeners. - * Based on the standard {@code java.util.EventListener} interface + * + *
Based on the standard {@code java.util.EventListener} interface * for the Observer design pattern. * - *
As of Spring 3.0, an ApplicationListener can generically declare the event type - * that it is interested in. When registered with a Spring ApplicationContext, events - * will be filtered accordingly, with the listener getting invoked for matching event - * objects only. + *
As of Spring 3.0, an {@code ApplicationListener} can generically declare
+ * the event type that it is interested in. When registered with a Spring
+ * {@code ApplicationContext}, events will be filtered accordingly, with the
+ * listener getting invoked for matching event objects only.
*
* @author Rod Johnson
* @author Juergen Hoeller
- * @param An {@link org.springframework.context.ApplicationEventPublisher}, typically
* a Spring {@link org.springframework.context.ApplicationContext}, can use an
- * ApplicationEventMulticaster as a delegate for actually publishing events.
+ * {@code ApplicationEventMulticaster} as a delegate for actually publishing events.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @author Stephane Nicoll
+ * @see ApplicationListener
*/
public interface ApplicationEventMulticaster {
@@ -55,21 +56,21 @@ public interface ApplicationEventMulticaster {
/**
* Remove a listener bean from the notification list.
- * @param listenerBeanName the name of the listener bean to add
+ * @param listenerBeanName the name of the listener bean to remove
*/
void removeApplicationListenerBean(String listenerBeanName);
/**
* Remove all listeners registered with this multicaster.
* After a remove call, the multicaster will perform no action
- * on event notification until new listeners are being registered.
+ * on event notification until new listeners are registered.
*/
void removeAllListeners();
/**
* Multicast the given application event to appropriate listeners.
* Consider using {@link #multicastEvent(ApplicationEvent, ResolvableType)}
- * if possible as it provides a better support for generics-based events.
+ * if possible as it provides better support for generics-based events.
* @param event the event to multicast
*/
void multicastEvent(ApplicationEvent event);
@@ -79,7 +80,7 @@ public interface ApplicationEventMulticaster {
* If the {@code eventType} is {@code null}, a default type is built
* based on the {@code event} instance.
* @param event the event to multicast
- * @param eventType the type of event (can be null)
+ * @param eventType the type of event (can be {@code null})
* @since 4.2
*/
void multicastEvent(ApplicationEvent event, @Nullable ResolvableType eventType);