#107 Event Aggregator example JavaDoc
This commit is contained in:
		| @@ -7,14 +7,18 @@ import java.util.List; | |||||||
|  *  |  *  | ||||||
|  * The Event Aggregator pattern channels events from multiple objects  |  * The Event Aggregator pattern channels events from multiple objects  | ||||||
|  * into a single object to simplify registration for clients. |  * into a single object to simplify registration for clients. | ||||||
|  *  |  * <p> | ||||||
|  * In the example LordBaelish, LordVarys and Scout deliver events to |  * In the example {@link LordBaelish}, {@link LordVarys} and {@link Scout} deliver events to | ||||||
|  * KingsHand. KingsHand, the event aggregator, then delivers the events |  * {@link KingsHand}. {@link KingsHand}, the event aggregator, then delivers the events | ||||||
|  * to KingJoffrey. |  * to {@link KingJoffrey}. | ||||||
|  * |  * | ||||||
|  */ |  */ | ||||||
| public class App { | public class App { | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Program entry point | ||||||
|  | 	 * @param args command line args | ||||||
|  | 	 */ | ||||||
| 	public static void main(String[] args) { | 	public static void main(String[] args) { | ||||||
| 		 | 		 | ||||||
| 		KingJoffrey kingJoffrey = new KingJoffrey(); | 		KingJoffrey kingJoffrey = new KingJoffrey(); | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ package com.iluwatar.event.aggregator; | |||||||
|  |  | ||||||
| /** | /** | ||||||
|  *  |  *  | ||||||
|  * KingJoffrey observes events from KingsHand. |  * KingJoffrey observes events from {@link KingsHand}. | ||||||
|  * |  * | ||||||
|  */ |  */ | ||||||
| public class KingJoffrey implements EventObserver { | public class KingJoffrey implements EventObserver { | ||||||
|   | |||||||
| @@ -1,5 +1,10 @@ | |||||||
| package com.iluwatar.event.aggregator; | package com.iluwatar.event.aggregator; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  *  | ||||||
|  |  * Weekday enumeration | ||||||
|  |  * | ||||||
|  |  */ | ||||||
| public enum Weekday { | public enum Weekday { | ||||||
| 	 | 	 | ||||||
| 	MONDAY("Monday"), TUESDAY("Tuesday"), WEDNESDAY("Wednesday"), THURSDAY("Thursday"), FRIDAY("Friday"), SATURDAY("Saturday"), SUNDAY("Sunday"); | 	MONDAY("Monday"), TUESDAY("Tuesday"), WEDNESDAY("Wednesday"), THURSDAY("Thursday"), FRIDAY("Friday"), SATURDAY("Saturday"), SUNDAY("Sunday"); | ||||||
|   | |||||||
| @@ -3,6 +3,11 @@ import org.junit.Test; | |||||||
|  |  | ||||||
| import com.iluwatar.event.aggregator.App; | import com.iluwatar.event.aggregator.App; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  *  | ||||||
|  |  * Application test | ||||||
|  |  * | ||||||
|  |  */ | ||||||
| public class AppTest { | public class AppTest { | ||||||
|  |  | ||||||
| 	@Test | 	@Test | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user