Class TransportListener
java.lang.Object
org.eclipse.aether.spi.connector.transport.TransportListener
A skeleton class for listeners used to monitor transport operations. Reusing common regular expression syntax, the
sequence of events is generally as follows:
( STARTED PROGRESSED* )*The methods in this class do nothing.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Notifies the listener about some progress in the data transfer.void
transportStarted
(long dataOffset, long dataLength) Notifies the listener about the start of the data transfer.
-
Constructor Details
-
TransportListener
protected TransportListener()Enables subclassing.
-
-
Method Details
-
transportStarted
Notifies the listener about the start of the data transfer. This event may arise more than once if the transfer needs to be restarted (e.g. after an authentication failure).- Parameters:
dataOffset
- The byte offset in the resource at which the transfer starts, must not be negative.dataLength
- The total number of bytes in the resource or-1
if the length is unknown.- Throws:
TransferCancelledException
- If the transfer should be aborted.
-
transportProgressed
Notifies the listener about some progress in the data transfer. This event may even be fired if actually zero bytes have been transferred since the last event, for instance to enable cancellation.- Parameters:
data
- The (read-only) buffer holding the bytes that have just been tranferred, must not benull
.- Throws:
TransferCancelledException
- If the transfer should be aborted.
-