install4j API documentation


com.install4j.api.events
Class InstallerFileEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.install4j.api.events.InstallerEvent
          extended by 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 the InstallerContext.

This event object contains additional information about the installed file. The event types EventType.BEFORE_INSTALL_FILE and EventType.AFTER_INSTALL_FILE produce this event object when fired.

Author:
ej-technologies GmbH
See Also:
InstallerEventListener, Context.addInstallerEventListener(InstallerEventListener), Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
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
 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, wasSuccessful
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 source
context - the context
type - the event type.
success - whether the operation associated with the event was successful
destinationFile - the installed file
fileSize - 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 source
context - the context
type - the event type.
destinationFile - the installed file
fileSize - 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 class InstallerEvent

getVerbose

public java.lang.String getVerbose()
Description copied from class: InstallerEvent
Return a verbose description of this event.

Overrides:
getVerbose in class InstallerEvent
Returns:
the description