Package noaa.coastwatch.io
Class StallMonitor
java.lang.Object
noaa.coastwatch.io.DataTransferAdapter
noaa.coastwatch.io.StallMonitor
- All Implemented Interfaces:
EventListener
,DataTransferListener
A stall monitor is a data transfer listener that helps to handle
stalled transfers. When a stall period has expired and no new
transfer progress has been made, the stall monitor calls a
user-specified method.
- Since:
- 3.1.6
- Author:
- Peter Hollemans
-
Constructor Summary
ConstructorDescriptionStallMonitor
(int stallTime, Runnable stallAction) Creates a new stall monitor with the specified stall time. -
Method Summary
Modifier and TypeMethodDescriptionvoid
transferEnded
(DataTransferEvent event) Responds to a data transfer ending.void
transferError
(DataTransferEvent event) Responds to a data transfer error.void
Responds to a data transfer in progress.void
transferStarted
(DataTransferEvent event) Responds to a data transfer starting.
-
Constructor Details
-
StallMonitor
Creates a new stall monitor with the specified stall time.- Parameters:
stallTime
- the number of milliseconds of transfer stall to wait before running the action.stallAction
- the runnable to invoke when a stall occurs.
-
-
Method Details
-
transferStarted
Description copied from interface:DataTransferListener
Responds to a data transfer starting.- Specified by:
transferStarted
in interfaceDataTransferListener
- Overrides:
transferStarted
in classDataTransferAdapter
-
transferProgress
Description copied from interface:DataTransferListener
Responds to a data transfer in progress.- Specified by:
transferProgress
in interfaceDataTransferListener
- Overrides:
transferProgress
in classDataTransferAdapter
-
transferEnded
Description copied from interface:DataTransferListener
Responds to a data transfer ending.- Specified by:
transferEnded
in interfaceDataTransferListener
- Overrides:
transferEnded
in classDataTransferAdapter
-
transferError
Description copied from interface:DataTransferListener
Responds to a data transfer error.- Specified by:
transferError
in interfaceDataTransferListener
- Overrides:
transferError
in classDataTransferAdapter
-