InstallerActionEvent (install4j API)
Description: declaration: package: com.install4j.api.events, class: InstallerActionEvent

# Class InstallerActionEvent

java.lang.Object
java.util.EventObject
com.install4j.api.events.InstallerEvent
com.install4j.api.events.InstallerActionEvent

All Implemented Interfaces:
  `Serializable`

public class InstallerActionEvent extends InstallerEvent
The event object that is passed to installer event listeners after an action has been executed. Event listeners are registered in the `InstallerContext`.

This event object contains additional information about the duration of the action.

See Also:
  - `InstallerEventListener`
  - `Context.addInstallerEventListener(InstallerEventListener)`
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class EventObject

  `source`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InstallerActionEvent(Object source, Context context, EventType type, boolean success, String actionId, long duration, Exception exception, List<String> log)`
  The constructor is called by the framework.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getActionId()`
  Returns the ID of the action.
  `long`
  `getDuration()`
  Returns the duration of the action in milliseconds
  `Exception`
  `getException()`
  Returns the exception if the action terminated abnormally or `null` if it terminated normally.
  `List<String>`
  `getLog()`
  Returns the log output produced by the action
  `String`
  `getVerbose()`
  Return a verbose description of this event.
  `String`
  `toString()`

  ### Methods inherited from class InstallerEvent

  `getContext, getType, setContext, wasSuccessful`

  ### Methods inherited from class EventObject

  `getSource`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### InstallerActionEvent

    public InstallerActionEvent(Object source, Context context, EventType type, boolean success, String actionId, long duration, Exception exception, List<String> log)
    The constructor is called by the framework.
    Parameters:
      `source` - the event source
      `context` - the context
      `type` - the event type.
      `success` - whether the operation associated with the event was successful
      `actionId` - the ID of the action
      `duration` - the duration in milliseconds
      `exception` - the exception if the action terminated abnormally or `null`
      `log` - the log output produced by the action

- ## Method Details

  - ### getActionId

    public String getActionId()
    Returns the ID of the action.
    Returns:
      the ID

  - ### getException

    public Exception getException()
    Returns the exception if the action terminated abnormally or `null` if it terminated normally.
    Returns:
      the exception or `null`

  - ### getLog

    public List<String> getLog()
    Returns the log output produced by the action
    Returns:
      a list of single log outputs

  - ### getDuration

    public long getDuration()
    Returns the duration of the action in milliseconds
    Returns:
      the duration in milliseconds

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `InstallerEvent`

  - ### getVerbose

    public String getVerbose()
    Description copied from class: `InstallerEvent`
    Return a verbose description of this event.
    Overrides:
      `getVerbose` in class `InstallerEvent`
    Returns:
      the description