Class EventMetaData

Object
se.curity.identityserver.sdk.data.EventMetaData
All Implemented Interfaces:
SerializableAsMap

public class EventMetaData extends Object implements SerializableAsMap
This object contains meta-data about a delivered Event that is not explicitly a component of said event. Instead, this meta-data describes the sender and receiver of the event.
  • Constructor Details

    • EventMetaData

      public EventMetaData(String serviceId, String serviceRole, Instant publishedInstant, Instant deliveredInstant)
  • Method Details

    • getServerId

      public String getServerId()
      Returns:
      the ID of the server the Event was published on
    • getServiceRole

      public String getServiceRole()
      Returns:
      The service role the node is operating as.
      Since:
      4.0.0
    • getDeliveredInstant

      public Instant getDeliveredInstant()
      Returns:
      the Instant the Event was delivered to the EventListener
    • getPublishedInstant

      public Instant getPublishedInstant()
      Returns:
      the Instant the Event was published
    • asMap

      public Map<String,Object> asMap()
      Specified by:
      asMap in interface SerializableAsMap
      Returns:
      representation of this Object as a Map containing only Java primitive types, plus instances of Collection, String and Map.

      It should be possible to fully re-construct this Object from a Map obtained by calling this method.

      Unfortunately, in Java it is quite hard to make the type system enforce this condition, so implementators must be especially careful about this.

    • toString

      public String toString()
      Overrides:
      toString in class Object