Project JXTA

net.jxta.util
Interface WatchedStream

All Known Implementing Classes:
WatchedInputStream, WatchedOutputStream

public interface WatchedStream


Method Summary
 void close()
          In case we want to close a watchStream regardless of its making progress.
 void setWatchList(Collection watchList)
          Sets the watcher list onto which this stream must register when it is not idle (so that it can be watched).
 void watch()
          This routine may be invoked as often as progress needs to be asserted.
 

Method Detail

setWatchList

void setWatchList(Collection watchList)
Sets the watcher list onto which this stream must register when it is not idle (so that it can be watched). This implementation may or may not remain registered while idle. This may affect performance but not functionality. It is assumed that that list is monitored by a watcher task that invokes the watch method as often as needed to monitor progress to its satifaction.

Parameters:
watchList - The watchList to register with. Must be a Synchronized Collection.

watch

void watch()
This routine may be invoked as often as progress needs to be asserted. After at most two watch cycles stalling is detected.


close

void close()
           throws IOException
In case we want to close a watchStream regardless of its making progress.

Throws:
IOException

JXTA J2SE