Class RecordingTransportListener
java.lang.Object
org.eclipse.aether.spi.connector.transport.TransportListener
org.eclipse.aether.internal.test.util.http.RecordingTransportListener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidgetBaos()longlongintintbooleanbooleanvoidNotifies the listener about some progress in the data transfer.voidtransportPropertiesAvailable(Map<TransferEvent.TransportPropertyKey, Object> transportProperties) Notifies the listener about the transport properties that are available for this transfer.voidtransportStarted(long dataOffset, long dataLength) Notifies the listener about the start of the data transfer.
-
Constructor Details
-
RecordingTransportListener
public RecordingTransportListener()
-
-
Method Details
-
transportStarted
Description copied from class:TransportListenerNotifies 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).- Overrides:
transportStartedin classTransportListener- 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-1if the length is unknown.- Throws:
TransferCancelledException- If the transfer should be aborted.
-
transportProgressed
Description copied from class:TransportListenerNotifies 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.- Overrides:
transportProgressedin classTransportListener- 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.
-
transportPropertiesAvailable
public void transportPropertiesAvailable(Map<TransferEvent.TransportPropertyKey, Object> transportProperties) throws TransferCancelledExceptionDescription copied from class:TransportListenerNotifies the listener about the transport properties that are available for this transfer. This method is called either before or after other notifications are sent:- for remote put tasks this is called after
TransportListener.transportStarted(long, long) - for remote peek tasks this is is the only event that is called
- for all other remote tasks this is called before
TransportListener.transportStarted(long, long)
- Overrides:
transportPropertiesAvailablein classTransportListener- Parameters:
transportProperties- The transport properties associated with this transfer, may be empty. The keys are transporter specific and the value types are key specific.- Throws:
TransferCancelledException- If the transfer should be aborted.
- for remote put tasks this is called after
-
getBaos
-
getDataOffset
-
getDataLength
-
getStartedCount
-
getProgressedCount
-
isCancelStart
-
isCancelProgress
-
cancelStart
-
cancelProgress
-
getTransportProperties
-