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:
Anurag Agarwal
2019-11-10 23:07:10 +05:30
committed by Ilkka Seppälä
parent 7c888e8886
commit 5ae2ce6e2e
38 changed files with 208 additions and 229 deletions

View File

@@ -24,14 +24,15 @@
package com.iluwatar.eda.framework;
/**
* A {@link Event} is an object with a specific type that is associated
* to a specific {@link Handler}.
* A {@link Event} is an object with a specific type that is associated to a specific {@link
* Handler}.
*/
public interface Event {
/**
* Returns the message type as a {@link Class} object. In this example the message type is
* used to handle events by their type.
* Returns the message type as a {@link Class} object. In this example the message type is used to
* handle events by their type.
*
* @return the message type as a {@link Class}.
*/
Class<? extends Event> getType();

View File

@@ -27,8 +27,8 @@ import java.util.HashMap;
import java.util.Map;
/**
* Handles the routing of {@link Event} messages to associated handlers.
* A {@link HashMap} is used to store the association between events and their respective handlers.
* Handles the routing of {@link Event} messages to associated handlers. A {@link HashMap} is used
* to store the association between events and their respective handlers.
*/
public class EventDispatcher {

View File

@@ -24,16 +24,18 @@
package com.iluwatar.eda.framework;
/**
* This interface can be implemented to handle different types of messages.
* Every handler is responsible for a single of type message
* This interface can be implemented to handle different types of messages. Every handler is
* responsible for a single of type message
*
* @param <E> Handler can handle events of type E
*/
public interface Handler<E extends Event> {
/**
* The onEvent method should implement and handle behavior related to the event.
* This can be as simple as calling another service to handle the event on publishing the event on
* a queue to be consumed by other sub systems.
* The onEvent method should implement and handle behavior related to the event. This can be as
* simple as calling another service to handle the event on publishing the event on a queue to be
* consumed by other sub systems.
*
* @param event the {@link Event} object to be handled.
*/
void onEvent(E event);