org.sonatype.aether.test.impl
Class RecordingTransferListener

java.lang.Object
  extended by org.sonatype.aether.test.impl.RecordingTransferListener
All Implemented Interfaces:
TransferListener

public class RecordingTransferListener
extends java.lang.Object
implements TransferListener


Constructor Summary
RecordingTransferListener()
           
RecordingTransferListener(TransferListener transferListener)
           
 
Method Summary
 void clear()
           
 java.util.List<TransferEvent> getEvents()
           
 java.util.List<TransferEvent> getProgressEvents()
           
 void transferCorrupted(TransferEvent event)
          Notifies the listener that a checksum validation failed.
 void transferFailed(TransferEvent event)
          Notifies the listener about the unsuccessful termination of a transfer.
 void transferInitiated(TransferEvent event)
          Notifies the listener about the initiation of a transfer.
 void transferProgressed(TransferEvent event)
          Notifies the listener about some progress in the data transfer.
 void transferStarted(TransferEvent event)
          Notifies the listener about the start of a data transfer, i.e.
 void transferSucceeded(TransferEvent event)
          Notifies the listener about the successful completion of a transfer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordingTransferListener

public RecordingTransferListener()

RecordingTransferListener

public RecordingTransferListener(TransferListener transferListener)
Method Detail

getEvents

public java.util.List<TransferEvent> getEvents()

getProgressEvents

public java.util.List<TransferEvent> getProgressEvents()

transferSucceeded

public void transferSucceeded(TransferEvent event)
Description copied from interface: TransferListener
Notifies the listener about the successful completion of a transfer.

Specified by:
transferSucceeded in interface TransferListener
Parameters:
event - The event details, must not be null.

transferStarted

public void transferStarted(TransferEvent event)
                     throws TransferCancelledException
Description copied from interface: TransferListener
Notifies the listener about the start of a data transfer, i.e. the successful connection to the remote repository.

Specified by:
transferStarted in interface TransferListener
Parameters:
event - The event details, must not be null.
Throws:
TransferCancelledException - If the transfer should be aborted.

transferProgressed

public void transferProgressed(TransferEvent event)
                        throws TransferCancelledException
Description copied from interface: TransferListener
Notifies the listener about some progress in the data transfer.

Specified by:
transferProgressed in interface TransferListener
Parameters:
event - The event details, must not be null.
Throws:
TransferCancelledException - If the transfer should be aborted.

transferInitiated

public void transferInitiated(TransferEvent event)
                       throws TransferCancelledException
Description copied from interface: TransferListener
Notifies the listener about the initiation of a transfer. This event gets fired before any actual network access to the remote repository.

Specified by:
transferInitiated in interface TransferListener
Parameters:
event - The event details, must not be null.
Throws:
TransferCancelledException - If the transfer should be aborted.

transferFailed

public void transferFailed(TransferEvent event)
Description copied from interface: TransferListener
Notifies the listener about the unsuccessful termination of a transfer.

Specified by:
transferFailed in interface TransferListener
Parameters:
event - The event details, must not be null.

transferCorrupted

public void transferCorrupted(TransferEvent event)
                       throws TransferCancelledException
Description copied from interface: TransferListener
Notifies the listener that a checksum validation failed. TransferEvent.getException() will be of type ChecksumFailureException and can be used to query further details about the expected/actual checksums.

Specified by:
transferCorrupted in interface TransferListener
Parameters:
event - The event details, must not be null.
Throws:
TransferCancelledException - If the transfer should be aborted.

clear

public void clear()


Copyright © 2010 Sonatype, Inc.. All Rights Reserved.