java.lang.Object
com.github.philippheuer.events4j.core.domain.Event
All Implemented Interfaces:
com.github.philippheuer.events4j.api.domain.IEvent

public abstract class Event extends Object implements com.github.philippheuer.events4j.api.domain.IEvent
Used to represent an event.
  • Constructor Details

    • Event

      public Event()
      Constructor
    • Event

      public Event(String eventId, Instant firedAt)
      Constructor
      Parameters:
      eventId - Unique event id
      firedAt - Timestamp of the event firing
  • Method Details

    • getFiredAt

      public Calendar getFiredAt()
      Specified by:
      getFiredAt in interface com.github.philippheuer.events4j.api.domain.IEvent
    • setFiredAt

      public void setFiredAt(Calendar calendar)
      Specified by:
      setFiredAt in interface com.github.philippheuer.events4j.api.domain.IEvent
    • getEventId

      public String getEventId()
      Unique event id
      Specified by:
      getEventId in interface com.github.philippheuer.events4j.api.domain.IEvent
    • getFiredAtInstant

      public Instant getFiredAtInstant()
      Event fired at
      Specified by:
      getFiredAtInstant in interface com.github.philippheuer.events4j.api.domain.IEvent
    • getServiceMediator

      public com.github.philippheuer.events4j.api.service.IServiceMediator getServiceMediator()
      Holds a reference to the ServiceMediator to access 3rd party services
      Specified by:
      getServiceMediator in interface com.github.philippheuer.events4j.api.domain.IEvent
    • setEventId

      public void setEventId(String eventId)
      Unique event id
      Specified by:
      setEventId in interface com.github.philippheuer.events4j.api.domain.IEvent
    • setFiredAtInstant

      public void setFiredAtInstant(Instant firedAtInstant)
      Event fired at
      Specified by:
      setFiredAtInstant in interface com.github.philippheuer.events4j.api.domain.IEvent
    • setServiceMediator

      public void setServiceMediator(com.github.philippheuer.events4j.api.service.IServiceMediator serviceMediator)
      Holds a reference to the ServiceMediator to access 3rd party services
      Specified by:
      setServiceMediator in interface com.github.philippheuer.events4j.api.domain.IEvent
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object