Class CustomEvent

java.lang.Object
com.novomind.ecom.api.iagent.common.event.CustomEvent
All Implemented Interfaces:
Event, com.novomind.ecom.common.api.attribute.Named

public class CustomEvent extends Object implements Event, com.novomind.ecom.common.api.attribute.Named
The CustomEvent is an object that can be used to be sent as event between different apps and plugins even between different processes. CustomEvent can be raised by the CustomEventHandler.raiseEvent(CustomEvent) method and processed by any appropriate CustomEventListener even in a different process.
Since:
12.20
  • Constructor Details

  • Method Details

    • setAttribute

      public final CustomEvent setAttribute(String key, String value)
      Set attributes of the event as key-value-pairs. Please note that the maximum size of all attribute values must not exceed a sum of 100 kilo bytes of characters.
      Parameters:
      key - the key of the attribute
      value - the value of the attribute
      Returns:
      the instance of CustomEvent
      Since:
      12.20
    • getAttribute

      public final String getAttribute(String key)
      Get attributes of the event.
      Parameters:
      key - the key of the attribute
      Returns:
      the value of the attribute
      Since:
      12.20
    • getName

      public final String getName()
      Specified by:
      getName in interface com.novomind.ecom.common.api.attribute.Named
    • getAttributes

      public final Map<String,String> getAttributes()
      Provides the attributes as map.
      Returns:
      the attribute map
      Since:
      12.20
    • getEventDate

      public Date getEventDate()
      Description copied from interface: Event
      Returns the Date when the event has occurred.
      Specified by:
      getEventDate in interface Event
      Returns:
      the Date of the event
    • toString

      public String toString()
      Overrides:
      toString in class Object