org.ops4j.monitors.stream
Interface StreamMonitor

All Known Implementing Classes:
PrintStreamMonitor, StreamMonitorRouter

public interface StreamMonitor

A monitor of a download activity or activities.

Version:
$Id$
Author:
Open Particpation Software for Java

Method Summary
 void notifyCompletion(URL resource)
          Notify the monitor of the successful completion of a download process.
 void notifyError(URL resource, String message)
          Notify the monitor of the an error during the download process.
 void notifyUpdate(URL resource, int expected, int count)
          Notify the monitor of the update in the download status.
 

Method Detail

notifyUpdate

void notifyUpdate(URL resource,
                  int expected,
                  int count)
Notify the monitor of the update in the download status.

Parameters:
resource - the name of the remote resource being downloaded.
expected - the expected number of bytes to be downloaded.
count - the number of bytes downloaded.

notifyCompletion

void notifyCompletion(URL resource)
Notify the monitor of the successful completion of a download process.

Parameters:
resource - the name of the remote resource.

notifyError

void notifyError(URL resource,
                 String message)
Notify the monitor of the an error during the download process.

Parameters:
resource - the name of the remote resource.
message - a non-localized message describing the problem in english.


Copyright © 2006-2013 OPS4J - Open Participation Software for Java. All Rights Reserved.