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

# Class InstallerEvent

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

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `InstallerActionEvent, InstallerDirectoryEvent, InstallerDownloadEvent, InstallerFileEvent, InstallerFileInstallationEvent, InstallerVariableEvent`

public class InstallerEvent extends EventObject
The event object that is passed to installer event listeners. Event listeners are registered in the `InstallerContext`.

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

- ## Field Summary

  ### Fields inherited from class EventObject

  `source`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InstallerEvent(Object source, Context context, EventType type)`
  The constructor is called by the framework.
  `InstallerEvent(Object source, Context context, EventType type, boolean success)`
  The constructor is called by the framework.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Context`
  `getContext()`
  Get the context.
  `EventType`
  `getType()`
  Get the type of the event.
  `String`
  `getVerbose()`
  Return a verbose description of this event.
  `void`
  `setContext(Context context)`
  `String`
  `toString()`
  `boolean`
  `wasSuccessful()`
  Return whether the operation associated with the event was successful

  ### Methods inherited from class EventObject

  `getSource`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### InstallerEvent

    public InstallerEvent(Object source, Context context, EventType type, boolean success)
    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

  - ### InstallerEvent

    public InstallerEvent(Object source, Context context, EventType type)
    The constructor is called by the framework.
    Parameters:
      `source` - the event source
      `context` - the context
      `type` - the event type.

- ## Method Details

  - ### getType

    public EventType getType()
    Get the type of the event.
    Returns:
      the type

  - ### getContext

    public Context getContext()
    Get the context.
    Returns:
      the context.

  - ### setContext

    public void setContext(Context context)

  - ### wasSuccessful

    public boolean wasSuccessful()
    Return whether the operation associated with the event was successful
    Returns:
      `true` or `false`.

  - ### toString

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

  - ### getVerbose

    public String getVerbose()
    Return a verbose description of this event.
    Returns:
      the description