Resolves checkstyle errors for event-* (#1070)
* Reduces checkstyle errors in event-aggregator * Reduces checkstyle errors in event-asynchronous * Reduces checkstyle errors in event-driven-architecture * Reduces checkstyle errors in event-queue * Reduces checkstyle errors in event-sourcing
This commit is contained in:
		
				
					committed by
					
						
						Ilkka Seppälä
					
				
			
			
				
	
			
			
			
						parent
						
							7c888e8886
						
					
				
				
					commit
					5ae2ce6e2e
				
			@@ -27,24 +27,22 @@ import java.util.ArrayList;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 
 | 
			
		||||
 * A system with lots of objects can lead to complexities when a client wants to subscribe to
 | 
			
		||||
 * events. The client has to find and register for each object individually, if each object has
 | 
			
		||||
 * multiple events then each event requires a separate subscription.
 | 
			
		||||
 * <p>
 | 
			
		||||
 * An Event Aggregator acts as a single source of events for many objects. It registers for all the
 | 
			
		||||
 * events of the many objects allowing clients to register with just the aggregator.
 | 
			
		||||
 * <p>
 | 
			
		||||
 * In the example {@link LordBaelish}, {@link LordVarys} and {@link Scout} deliver events to
 | 
			
		||||
 * {@link KingsHand}. {@link KingsHand}, the event aggregator, then delivers the events to
 | 
			
		||||
 * {@link KingJoffrey}.
 | 
			
		||||
 *
 | 
			
		||||
 * <p>An Event Aggregator acts as a single source of events for many objects. It registers for all
 | 
			
		||||
 * the events of the many objects allowing clients to register with just the aggregator.
 | 
			
		||||
 *
 | 
			
		||||
 * <p>In the example {@link LordBaelish}, {@link LordVarys} and {@link Scout} deliver events to
 | 
			
		||||
 * {@link KingsHand}. {@link KingsHand}, the event aggregator, then delivers the events to {@link
 | 
			
		||||
 * KingJoffrey}.
 | 
			
		||||
 */
 | 
			
		||||
public class App {
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Program entry point
 | 
			
		||||
   * 
 | 
			
		||||
   * Program entry point.
 | 
			
		||||
   *
 | 
			
		||||
   * @param args command line args
 | 
			
		||||
   */
 | 
			
		||||
  public static void main(String[] args) {
 | 
			
		||||
 
 | 
			
		||||
@@ -24,9 +24,7 @@
 | 
			
		||||
package com.iluwatar.event.aggregator;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 
 | 
			
		||||
 * Event enumeration.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
public enum Event {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -27,9 +27,7 @@ import java.util.LinkedList;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 
 | 
			
		||||
 * EventEmitter is the base class for event producers that can be observed.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
public abstract class EventEmitter {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -24,9 +24,7 @@
 | 
			
		||||
package com.iluwatar.event.aggregator;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 
 | 
			
		||||
 * Observers of events implement this interface.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
public interface EventObserver {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -27,9 +27,7 @@ import org.slf4j.Logger;
 | 
			
		||||
import org.slf4j.LoggerFactory;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 
 | 
			
		||||
 * KingJoffrey observes events from {@link KingsHand}.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
public class KingJoffrey implements EventObserver {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -24,9 +24,7 @@
 | 
			
		||||
package com.iluwatar.event.aggregator;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 
 | 
			
		||||
 * KingsHand observes events from multiple sources and delivers them to listeners.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
public class KingsHand extends EventEmitter implements EventObserver {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -24,9 +24,7 @@
 | 
			
		||||
package com.iluwatar.event.aggregator;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 
 | 
			
		||||
 * LordBaelish produces events.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
public class LordBaelish extends EventEmitter {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -24,9 +24,7 @@
 | 
			
		||||
package com.iluwatar.event.aggregator;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 
 | 
			
		||||
 * LordVarys produces events.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
public class LordVarys extends EventEmitter {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -24,9 +24,7 @@
 | 
			
		||||
package com.iluwatar.event.aggregator;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 
 | 
			
		||||
 * Scout produces events.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
public class Scout extends EventEmitter {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -24,9 +24,7 @@
 | 
			
		||||
package com.iluwatar.event.aggregator;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 
 | 
			
		||||
 * Weekday enumeration
 | 
			
		||||
 *
 | 
			
		||||
 * Weekday enumeration.
 | 
			
		||||
 */
 | 
			
		||||
public enum Weekday {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user