org.apache.geronimo.system.plugin
Interface DownloadPoller

All Known Implementing Classes:
DownloadResults

public interface DownloadPoller

An interface for callers who want to monitor the progress of an installation. These are all callbacks sent by the server.

See Also:
PluginInstaller

Method Summary
 void addDependencyInstalled(Artifact dep)
          Notes that the current install operation found a dependency, and that dependency was downloaded from a remote repository and installed into the local server environment.
 void addDependencyPresent(Artifact dep)
          Notes that the current install operation found a dependency, and that dependency was satisfied by an artifact already available in the current server environment.
 void addDownloadBytes(long bytes)
          Called at the end of a file download with the number of bytes downloaded in the current operation.
 void addInstalledConfigID(Artifact target)
          Notes that a configuration passed as an argument to the install operation was successfully installed.
 void addRemovedConfigID(Artifact obsolete)
          Notes a configuration that was removed because it was obsoleted by a newly-installed configuration.
 void addRestartedConfigID(Artifact target)
          Notes that a configuration was restarted as a result of the current operation.
 void addSkippedConfigID(MissingDependencyException e)
          Provides details on why a plugin was not installed.
 void setCurrentFile(String currentFile)
          Indicates which file the configuration installer is working on at the moment.
 void setCurrentFilePercent(int currentFileProgress)
          Gives the percent complete for a file currently being downloaded.
 void setCurrentMessage(String currentMessage)
          Describes the current operation status as a text message.
 void setFailure(Exception failure)
          Indicates that a failure was encountered during the installation operation.
 void setFinished()
          Always called when the operation is complete, regardless of whether there was a failure or not.
 

Method Detail

addRemovedConfigID

void addRemovedConfigID(Artifact obsolete)
Notes a configuration that was removed because it was obsoleted by a newly-installed configuration.


addInstalledConfigID

void addInstalledConfigID(Artifact target)
Notes that a configuration passed as an argument to the install operation was successfully installed. This will only be called on the original arguments to the install command, not on anything installed because it was a dependency.


addRestartedConfigID

void addRestartedConfigID(Artifact target)
Notes that a configuration was restarted as a result of the current operation. This usually means that it depended on a configuration that was obsoleted (removed), so it shut down when the remove happened, and was started up again after the replacement was installed.


addSkippedConfigID

void addSkippedConfigID(MissingDependencyException e)
Provides details on why a plugin was not installed.

Parameters:
e - MissingDependencyException containing info on

addDependencyPresent

void addDependencyPresent(Artifact dep)
Notes that the current install operation found a dependency, and that dependency was satisfied by an artifact already available in the current server environment.


addDependencyInstalled

void addDependencyInstalled(Artifact dep)
Notes that the current install operation found a dependency, and that dependency was downloaded from a remote repository and installed into the local server environment.


setCurrentFile

void setCurrentFile(String currentFile)
Indicates which file the configuration installer is working on at the moment. Mainly for purposes of user feedback during asynchronous requests.


setCurrentMessage

void setCurrentMessage(String currentMessage)
Describes the current operation status as a text message. Mainly for purposes of user feedback during asynchronous requests.


setCurrentFilePercent

void setCurrentFilePercent(int currentFileProgress)
Gives the percent complete for a file currently being downloaded. Mainly for purposes of user feedback during asynchronous requests. This may be -1 if the download server does not supply the file size in advance.


addDownloadBytes

void addDownloadBytes(long bytes)
Called at the end of a file download with the number of bytes downloaded in the current operation. This can be used to calculate a rough transfer rate (the time between setCurrentFile and setDownloadBytes) as well as if the caller wants to total the size of all downloads for the current installation.


setFailure

void setFailure(Exception failure)
Indicates that a failure was encountered during the installation operation. Any failure is currently treated as fatal -- the installer will not attempt to complete additional tasks after a failure.


setFinished

void setFinished()
Always called when the operation is complete, regardless of whether there was a failure or not.



Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.