Package com.install4j.api.events
Class InstallerFileEvent
- java.lang.Object
-
- java.util.EventObject
-
- com.install4j.api.events.InstallerEvent
-
- com.install4j.api.events.InstallerFileEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class InstallerFileEvent extends InstallerEvent
The event object that is passed to installer event listeners for single file installation events types. Event listeners are registered in theInstallerContext
.This event object contains additional information about the installed file. The event types
EventType.BEFORE_INSTALL_FILE
andEventType.AFTER_INSTALL_FILE
produce this event object when fired.
-
-
Constructor Summary
Constructors Constructor Description InstallerFileEvent(java.lang.Object source, Context context, EventType type, boolean success, java.io.File destinationFile, long fileSize)
The constructor is called by the framework.InstallerFileEvent(java.lang.Object source, Context context, EventType type, java.io.File destinationFile, long fileSize)
The constructor is called by the framework.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.File
getDestinationFile()
Get the installed file location that is associated with this event.long
getFileSize()
Get the size of the installed file in bytes.java.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
-
InstallerFileEvent
public InstallerFileEvent(java.lang.Object source, Context context, EventType type, boolean success, java.io.File destinationFile, long fileSize)
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 successfuldestinationFile
- the installed filefileSize
- the size of the installed file
-
InstallerFileEvent
public InstallerFileEvent(java.lang.Object source, Context context, EventType type, java.io.File destinationFile, long fileSize)
The constructor is called by the framework.- Parameters:
source
- the event sourcecontext
- the contexttype
- the event type.destinationFile
- the installed filefileSize
- the size of the installed file
-
-
Method Detail
-
getDestinationFile
public java.io.File getDestinationFile()
Get the installed file location that is associated with this event.- Returns:
- the file
-
getFileSize
public long getFileSize()
Get the size of the installed file in bytes.- Returns:
- the size in bytes
-
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
-
-