# InstallerActionEvent

Import: `import com.install4j.api.events.InstallerActionEvent;`

```java
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`](../context/InstallerContext.md).

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


**See also:**

- [InstallerEventListener](InstallerEventListener.md)
- [InstallerContext.addInstallerEventListener](../context/InstallerContext.md#addinstallereventlistener-installereventlistener)

## Inherited from

- [InstallerEvent](InstallerEvent.md) — 6 methods

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`getActionId()`](#getactionid) | `String` | Returns the ID of the action. |
| [`getException()`](#getexception) | `Exception` | The exception if the action terminated abnormally or `null`. |
| [`getLog()`](#getlog) | `List<String>` | Returns the log output produced by the action |
| [`getDuration()`](#getduration) | `long` | Returns the duration of the action in milliseconds |
| [`toString()`](#tostring) | `String` |  |
| [`getVerbose()`](#getverbose) | `String` |  |

### getActionId()

```java
public String getActionId()
```

Returns the ID of the action.


**Returns:** the ID

### getException()

```java
public Exception getException()
```

The exception if the action terminated abnormally or `null`.


**Returns:** the ID

### getLog()

```java
public List<String> getLog()
```

Returns the log output produced by the action


**Returns:** a list of single log outputs

### getDuration()

```java
public long getDuration()
```

Returns the duration of the action in milliseconds


**Returns:** the duration in milliseconds

### toString()

```java
public String toString()
```

### getVerbose()

```java
public String getVerbose()
```

## Constructors

| Signature | Description |
|---|---|
| [`InstallerActionEvent(Object, Context, EventType, boolean, String, long, Exception, List<String>)`](#installeractionevent-object-context-eventtype-boolean-string-long-exception-list-string) | The constructor is called by the framework. |

### InstallerActionEvent(Object, Context, EventType, boolean, String, long, Exception, List<String>)

```java
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

