Package com.install4j.api.events
Class InstallerActionEvent
java.lang.Object
java.util.EventObject
com.install4j.api.events.InstallerEvent
com.install4j.api.events.InstallerActionEvent
- All Implemented Interfaces:
Serializable
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:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.install4j.api.events.InstallerEvent
getContext, getType, setContext, wasSuccessfulMethods inherited from class java.util.EventObject
getSource
-
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 sourcecontext- the contexttype- the event type.success- whether the operation associated with the event was successfulactionId- the ID of the actionduration- the duration in millisecondsexception- the exception if the action terminated abnormally ornulllog- the log output produced by the action
-
-
Method Details
-
getActionId
Returns the ID of the action.- Returns:
- the ID
-
getException
The exception if the action terminated abnormally ornull.- Returns:
- the ID
-
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
- Overrides:
toStringin classInstallerEvent
-
getVerbose
Description copied from class:InstallerEventReturn a verbose description of this event.- Overrides:
getVerbosein classInstallerEvent- Returns:
- the description
-