Skip to content

Instantly share code, notes, and snippets.

@chermehdi
Created November 4, 2018 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chermehdi/69c937de695b7622240531f6b76e54ef to your computer and use it in GitHub Desktop.
Save chermehdi/69c937de695b7622240531f6b76e54ef to your computer and use it in GitHub Desktop.
Event contract
package io.github.chermehdi.bus;
/**
* interface describing a generic event, and it's associated meta data, it's this what's going to
* get sent in the bus to be dispatched to intrested Subscribers
*
* @author chermehdi
*/
public interface Event<T> {
/**
* @returns the stored data associated with the event
*/
T getData();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment