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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidNotifies the listener about some progress in the data transfer.voidtransportPropertiesAvailable(Map<org.eclipse.aether.transfer.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
-
TransportListener
protected TransportListener()Enables subclassing.
-
-
Method Details
-
transportStarted
public void transportStarted(long dataOffset, long dataLength) throws org.eclipse.aether.transfer.TransferCancelledException 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-1if the length is unknown.- Throws:
org.eclipse.aether.transfer.TransferCancelledException- If the transfer should be aborted.
-
transportProgressed
public void transportProgressed(ByteBuffer data) throws org.eclipse.aether.transfer.TransferCancelledException 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:
org.eclipse.aether.transfer.TransferCancelledException- If the transfer should be aborted.
-
transportPropertiesAvailable
public void transportPropertiesAvailable(Map<org.eclipse.aether.transfer.TransferEvent.TransportPropertyKey, Object> transportProperties) throws org.eclipse.aether.transfer.TransferCancelledException Notifies 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
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
transportStarted(long, long)
- 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:
org.eclipse.aether.transfer.TransferCancelledException- If the transfer should be aborted.- Since:
- 2.0.21
- for remote put tasks this is called after
-