Class Event

    • Constructor Detail

      • Event

        public Event​(ActionId actionId,
                     java.time.Instant instant,
                     Parameter<?>... params)
        Instantiates a new event.
        Parameters:
        actionId - the action component_id
        instant - the instant, will set the timestamp
        params - the params
      • Event

        public Event​(ActionId actionId,
                     java.time.Instant instant,
                     ParameterList params)
        Instantiates a new event.
        Parameters:
        actionId - the action component_id
        instant - the instant, will set the timestamp
        params - the params
      • Event

        public Event​(ActionId actionId,
                     boolean isTry,
                     Parameter<?>... params)
        Instantiates a new event.
        Parameters:
        actionId - the action component_id
        isTry - the is try
        params - the params
      • Event

        public Event​(ActionId actionId,
                     Parameter<?>... params)
        Instantiates a new event.
        Parameters:
        actionId - the action component_id
        params - the params
    • Method Detail

      • addParameter

        public <T> void addParameter​(String name,
                                     T value)
        Description copied from interface: ParameterListProvider
        Adds a parameter.
        Specified by:
        addParameter in interface ParameterListProvider
        Type Parameters:
        T - the generic type
        Parameters:
        name - the name of the parameter
        value - the value of the parameter
      • getMillisecondSinceEpoch

        public Long getMillisecondSinceEpoch()
        Gets the time at which the action occurred / was intercepted by the PEP.
        Returns:
        the milliseconds since epoch
      • getParameterValue

        public <T> T getParameterValue​(String name,
                                       Class<T> clazz)
        Description copied from interface: ParameterListProvider
        Gets a parameter value.
        Specified by:
        getParameterValue in interface ParameterListProvider
        Type Parameters:
        T - the generic type
        Parameters:
        name - the name of the parameter
        clazz - the value of the parameter
        Returns:
        the value of the parameter, or null if it does not exist
      • getValueForName

        public Object getValueForName​(String name)
        Gets the object which is added as parameter for given name.
        Parameters:
        name - the name
        Returns:
        the object, null in case the parameter with the given name does not exist
      • setTimestamp

        public void setTimestamp​(java.time.Instant instant)
        Sets the time at which the action occurred / was intercepted by the PEP.
        Parameters:
        instant - the instant to set
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object