mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-20 14:24:15 +00:00
cfb0fafc7d
Adds various changes including : - Fixes to Javadoc - Test refactoring and improvements - Refactored EventDispatcher to be immutable - Removed DynamicRouter interface since it not needed - Renamed Channel to a more appropriate name - Handler
22 lines
526 B
Java
22 lines
526 B
Java
package com.iluwatar.eda.event;
|
|
|
|
import com.iluwatar.eda.model.User;
|
|
|
|
/**
|
|
* The {@link UserCreatedEvent} should should be dispatched whenever a user has been created.
|
|
* This class can be extended to contain details about the user has been created. In this example,
|
|
* the entire {@link User} object is passed on as data with the event.
|
|
*/
|
|
public class UserCreatedEvent extends Event {
|
|
|
|
private User user;
|
|
|
|
public UserCreatedEvent(User user) {
|
|
this.user = user;
|
|
}
|
|
|
|
public User getUser() {
|
|
return user;
|
|
}
|
|
}
|