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.

Version:
$Rev: 409817 $ $Date: 2006-05-27 09:56:38 +0200 (Sat, 27 May 2006) $
See Also:
PluginInstaller

Method Summary
 void addDependencyInstalled(org.apache.geronimo.kernel.repository.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(org.apache.geronimo.kernel.repository.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(org.apache.geronimo.kernel.repository.Artifact target)
          Notes that a configuration passed as an argument to the install operation was successfully installed.
 void addRemovedConfigID(org.apache.geronimo.kernel.repository.Artifact obsolete)
          Notes a configuration that was removed because it was obsoleted by a newly-installed configuration.
 void addRestartedConfigID(org.apache.geronimo.kernel.repository.Artifact target)
          Notes that a configuration was restarted as a result of the current operation.
 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

public void addRemovedConfigID(org.apache.geronimo.kernel.repository.Artifact obsolete)
Notes a configuration that was removed because it was obsoleted by a newly-installed configuration.


addInstalledConfigID

public void addInstalledConfigID(org.apache.geronimo.kernel.repository.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

public void addRestartedConfigID(org.apache.geronimo.kernel.repository.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.


addDependencyPresent

public void addDependencyPresent(org.apache.geronimo.kernel.repository.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

public void addDependencyInstalled(org.apache.geronimo.kernel.repository.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

public 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

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


setCurrentFilePercent

public 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

public 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

public 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

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



Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.