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_FILEandEventType.AFTER_INSTALL_FILEproduce 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.FilegetDestinationFile()Get the installed file location that is associated with this event.longgetFileSize()Get the size of the installed file in bytes.java.lang.StringgetVerbose()Return a verbose description of this event.java.lang.StringtoString()-
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:
toStringin classInstallerEvent
-
getVerbose
public java.lang.String getVerbose()
Description copied from class:InstallerEventReturn a verbose description of this event.- Overrides:
getVerbosein classInstallerEvent- Returns:
- the description
-
-