public class StreamMonitorRouter extends Object implements StreamMonitor
| Constructor and Description |
|---|
StreamMonitorRouter()
Creation of a new network monitor router.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addStreamMonitor(StreamMonitor monitor)
Add a monitor to the list of monitors managed by this router.
|
StreamMonitor |
getMonitor(int index)
Returns a Monitor.
|
void |
notifyCompletion(URL resource)
Notify all subscribing monitors of a download completion event.
|
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 all subscribing monitors of a updated event.
|
void |
removeStreamMonitor(StreamMonitor monitor)
Remove a monitor to the list of monitors managed by this router.
|
int |
size()
Returns the number of Monitors that are being handled by this router.
|
public StreamMonitorRouter()
public void notifyUpdate(URL resource, int expected, int count)
notifyUpdate in interface StreamMonitorresource - the url of the updated resourceexpected - the size in bytes of the downloadcount - the progress in bytespublic void notifyCompletion(URL resource)
notifyCompletion in interface StreamMonitorresource - the url of the downloaded resourcepublic void notifyError(URL resource, String message)
notifyError in interface StreamMonitorresource - the name of the remote resource.message - a non-localized message describing the problem in english.public void addStreamMonitor(StreamMonitor monitor)
monitor - the monitor to addpublic void removeStreamMonitor(StreamMonitor monitor)
monitor - the monitor to addpublic int size()
public StreamMonitor getMonitor(int index)
index - The index in the List of the Monitor to return.Copyright © 2006-2013 OPS4J - Open Participation Software for Java. All Rights Reserved.