class SafeTransferListener extends AbstractTransferListener
| Modifier and Type | Field and Description |
|---|---|
private TransferListener |
listener |
private static org.slf4j.Logger |
LOGGER |
| Modifier | Constructor and Description |
|---|---|
protected |
SafeTransferListener(RepositorySystemSession session) |
private |
SafeTransferListener(TransferListener listener) |
| Modifier and Type | Method and Description |
|---|---|
private void |
logError(TransferEvent event,
java.lang.Throwable e) |
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.
|
void |
transferSucceeded(TransferEvent event)
Notifies the listener about the successful completion of a transfer.
|
static TransferListener |
wrap(RepositorySystemSession session) |
private static final org.slf4j.Logger LOGGER
private final TransferListener listener
protected SafeTransferListener(RepositorySystemSession session)
private SafeTransferListener(TransferListener listener)
public static TransferListener wrap(RepositorySystemSession session)
private void logError(TransferEvent event, java.lang.Throwable e)
public void transferInitiated(TransferEvent event) throws TransferCancelledException
TransferListenertransferInitiated in interface TransferListenertransferInitiated in class AbstractTransferListenerevent - The event details, must not be null.TransferCancelledException - If the transfer should be aborted.public void transferStarted(TransferEvent event) throws TransferCancelledException
TransferListenerTransferResource.getContentLength() if possible. This event may be fired multiple times for given
transfer request if said transfer needs to be repeated (e.g. in response to an authentication challenge).transferStarted in interface TransferListenertransferStarted in class AbstractTransferListenerevent - The event details, must not be null.TransferCancelledException - If the transfer should be aborted.public void transferProgressed(TransferEvent event) throws TransferCancelledException
TransferListenertransferProgressed in interface TransferListenertransferProgressed in class AbstractTransferListenerevent - The event details, must not be null.TransferCancelledException - If the transfer should be aborted.public void transferCorrupted(TransferEvent event) throws TransferCancelledException
TransferListenerTransferEvent.getException() will be of type
ChecksumFailureException and can be used to query further details about the expected/actual checksums.transferCorrupted in interface TransferListenertransferCorrupted in class AbstractTransferListenerevent - The event details, must not be null.TransferCancelledException - If the transfer should be aborted.public void transferSucceeded(TransferEvent event)
TransferListenertransferSucceeded in interface TransferListenertransferSucceeded in class AbstractTransferListenerevent - The event details, must not be null.public void transferFailed(TransferEvent event)
TransferListenerTransferEvent.getException() will
provide further information about the failure.transferFailed in interface TransferListenertransferFailed in class AbstractTransferListenerevent - The event details, must not be null.