Class TransportListener

java.lang.Object
org.eclipse.aether.spi.connector.transport.TransportListener

public abstract class TransportListener extends Object
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 Details

  • Method Details

    • transportStarted

      public void transportStarted(long dataOffset, long dataLength) throws 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 -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 be null.
      Throws:
      TransferCancelledException - If the transfer should be aborted.