public final class ChainedTransferListener extends AbstractTransferListener
| Constructor and Description |
|---|
ChainedTransferListener(Collection<? extends TransferListener> listeners)
Creates a new multicast listener that delegates to the specified listeners.
|
ChainedTransferListener(TransferListener... listeners)
Creates a new multicast listener that delegates to the specified listeners.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Collection<? extends TransferListener> listeners)
Adds the specified listeners to the end of the multicast chain.
|
void |
add(TransferListener listener)
Adds the specified listener to the end of the multicast chain.
|
protected void |
handleError(TransferEvent event,
TransferListener listener,
RuntimeException error) |
static TransferListener |
newInstance(TransferListener listener1,
TransferListener listener2)
Creates a new multicast listener that delegates to the specified listeners.
|
void |
remove(TransferListener listener)
Removes the specified listener from the multicast chain.
|
void |
transferCorrupted(TransferEvent event) |
void |
transferFailed(TransferEvent event) |
void |
transferInitiated(TransferEvent event) |
void |
transferProgressed(TransferEvent event) |
void |
transferStarted(TransferEvent event) |
void |
transferSucceeded(TransferEvent event) |
public ChainedTransferListener(TransferListener... listeners)
listeners - The listeners to delegate to, may be null or empty.public ChainedTransferListener(Collection<? extends TransferListener> listeners)
listeners - The listeners to delegate to, may be null or empty.public static TransferListener newInstance(TransferListener listener1, TransferListener listener2)
null.listener1 - The first listener, may be null.listener2 - The second listener, may be null.null if no listener was supplied.public void add(Collection<? extends TransferListener> listeners)
listeners - The listeners to add, may be null or empty.public void add(TransferListener listener)
listener - The listener to add, may be null.public void remove(TransferListener listener)
listener - The listener to remove, may be null.protected void handleError(TransferEvent event, TransferListener listener, RuntimeException error)
public void transferInitiated(TransferEvent event) throws TransferCancelledException
transferInitiated in interface TransferListenertransferInitiated in class AbstractTransferListenerTransferCancelledExceptionpublic void transferStarted(TransferEvent event) throws TransferCancelledException
transferStarted in interface TransferListenertransferStarted in class AbstractTransferListenerTransferCancelledExceptionpublic void transferProgressed(TransferEvent event) throws TransferCancelledException
transferProgressed in interface TransferListenertransferProgressed in class AbstractTransferListenerTransferCancelledExceptionpublic void transferCorrupted(TransferEvent event) throws TransferCancelledException
transferCorrupted in interface TransferListenertransferCorrupted in class AbstractTransferListenerTransferCancelledExceptionpublic void transferSucceeded(TransferEvent event)
transferSucceeded in interface TransferListenertransferSucceeded in class AbstractTransferListenerpublic void transferFailed(TransferEvent event)
transferFailed in interface TransferListenertransferFailed in class AbstractTransferListenerCopyright © 2010–2021 The Apache Software Foundation. All rights reserved.