Class EventExternalized<S,T>

java.lang.Object
org.springframework.modulith.events.EventExternalized<S,T>
All Implemented Interfaces:
ResolvableTypeProvider

public class EventExternalized<S,T> extends Object implements ResolvableTypeProvider
An infrastructure event signaling that an application event has been externalized with a particular, broker-specific result.
Since:
1.1
Author:
Oliver Drotbohm
  • Constructor Details

    • EventExternalized

      public EventExternalized(S event, Object mapped, RoutingTarget target, @Nullable T brokerResult)
      Creates a new EventExternalized event for the given source event, its mapped derivative, RoutingTarget and broker result.
      Parameters:
      event - must not be null.
      mapped - must not be null.
      target - must not be null.
      brokerResult - can be null
  • Method Details

    • getEvent

      public S getEvent()
      Returns the source event.
      Returns:
      will never be null.
    • getEventType

      public Class<S> getEventType()
      Returns the type of the source event.
      Returns:
      will never be null.
    • getMapped

      public Object getMapped()
      Returns the mapped event.
      Returns:
      will never be null.
    • getTarget

      public RoutingTarget getTarget()
      Returns the routing target.
      Returns:
      will never be null.
    • getBrokerResult

      public T getBrokerResult()
      Returns the broker result.
      Returns:
      can be null.
    • getResolvableType

      public ResolvableType getResolvableType()
      Specified by:
      getResolvableType in interface ResolvableTypeProvider
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object