Class Event


  • public class Event
    extends java.lang.Object
    Represents an event which typically corresponds to a method call on a proxy. An event has an id and zero or more arguments typically corresponding to the method arguments.
    • Constructor Summary

      Constructors 
      Constructor Description
      Event​(java.lang.Object id, StateContext context)
      Creates a new Event with the specified id and no arguments.
      Event​(java.lang.Object id, StateContext context, java.lang.Object[] arguments)
      Creates a new Event with the specified id and arguments.
    • Field Detail

      • WILDCARD_EVENT_ID

        public static final java.lang.String WILDCARD_EVENT_ID
        The wildcard event
        See Also:
        Constant Field Values
      • id

        private final java.lang.Object id
      • arguments

        private final java.lang.Object[] arguments
    • Constructor Detail

      • Event

        public Event​(java.lang.Object id,
                     StateContext context)
        Creates a new Event with the specified id and no arguments.
        Parameters:
        id - the event id.
        context - the StateContext the event was triggered for.
      • Event

        public Event​(java.lang.Object id,
                     StateContext context,
                     java.lang.Object[] arguments)
        Creates a new Event with the specified id and arguments.
        Parameters:
        id - the event id.
        context - the StateContext the event was triggered for.
        arguments - the event arguments.
    • Method Detail

      • getId

        public java.lang.Object getId()
        Returns:
        the id of this Event.
      • getArguments

        public java.lang.Object[] getArguments()
        Returns:
        the arguments of this Event. @return an empty array if this Event has no arguments.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object