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:
java.io.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 theInstallerContext
.This event object contains additional information about the duration of the action.
-
-
Constructor Summary
Constructors Constructor Description InstallerActionEvent(java.lang.Object source, Context context, EventType type, boolean success, java.lang.String actionId, long duration, java.lang.Exception exception, java.util.List<java.lang.String> log)
The constructor is called by the framework.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getActionId()
Returns the ID of the action.long
getDuration()
Returns the duration of the action in millisecondsjava.lang.Exception
getException()
The exception if the action terminated abnormally ornull
.java.util.List<java.lang.String>
getLog()
Returns the log output produced by the actionjava.lang.String
getVerbose()
Return a verbose description of this event.java.lang.String
toString()
-
Methods inherited from class com.install4j.api.events.InstallerEvent
getContext, getType, setContext, wasSuccessful
-
-
-
-
Constructor Detail
-
InstallerActionEvent
public InstallerActionEvent(java.lang.Object source, Context context, EventType type, boolean success, java.lang.String actionId, long duration, java.lang.Exception exception, java.util.List<java.lang.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 ornull
log
- the log output produced by the action
-
-
Method Detail
-
getActionId
public java.lang.String getActionId()
Returns the ID of the action.- Returns:
- the ID
-
getException
public java.lang.Exception getException()
The exception if the action terminated abnormally ornull
.- Returns:
- the ID
-
getLog
public java.util.List<java.lang.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 java.lang.String toString()
- Overrides:
toString
in classInstallerEvent
-
getVerbose
public java.lang.String getVerbose()
Description copied from class:InstallerEvent
Return a verbose description of this event.- Overrides:
getVerbose
in classInstallerEvent
- Returns:
- the description
-
-