public final class TransferEventSupport extends Object
Constructor and Description |
---|
TransferEventSupport() |
Modifier and Type | Method and Description |
---|---|
void |
addTransferListener(TransferListener listener)
Adds the listener to the collection of listeners
who will be notified when any transfer event occurs
in this
Wagon object. |
void |
fireDebug(String message)
Dispatches the given debug message
to all registered listeners (calls method
TransferListener.debug(String) on all of them. |
void |
fireTransferCompleted(TransferEvent transferEvent)
Dispatches the given
TransferEvent
to all registered listeners (calls method TransferListener.transferCompleted(TransferEvent) on all of
them}. |
void |
fireTransferError(TransferEvent transferEvent)
Dispatches the given
TransferEvent
to all registered listeners (calls method TransferListener.transferError(TransferEvent) on all of them. |
void |
fireTransferInitiated(TransferEvent transferEvent)
Dispatches the given
TransferEvent
to all registered listeners (calls method TransferListener.transferInitiated(TransferEvent) on all of
them. |
void |
fireTransferProgress(TransferEvent transferEvent,
byte[] buffer,
int length)
Dispatches the given
TransferEvent
to all registered listeners (calls method TransferListener.transferProgress(TransferEvent, byte[], int)
on all of them). |
void |
fireTransferStarted(TransferEvent transferEvent)
Dispatches the given
TransferEvent
to all registered listeners (calls method TransferListener.transferStarted(TransferEvent) on all of
them}. |
boolean |
hasTransferListener(TransferListener listener)
Returns whether the specified instance of transfer
listener was added to the collection of listeners
who will be notified when an transfer event occurs
|
void |
removeTransferListener(TransferListener listener)
Removes the transfer listener from the collection of listeners so
it no longer receives transfer events.
|
public TransferEventSupport()
public void addTransferListener(TransferListener listener)
Wagon
object.
null
, no exception is thrown and no action is performedlistener
- the transfer listenerremoveTransferListener(org.apache.maven.wagon.events.TransferListener)
,
TransferListener
public void removeTransferListener(TransferListener listener)
null
or specified listener was not added
to this TransferEventSupport
object
no exception is thrown and no action is performedlistener
- the transfer listeneraddTransferListener(TransferListener)
public boolean hasTransferListener(TransferListener listener)
listener
- the transfer listenertrue
if given listener was added to the collection of listeners
false
otherwise
TransferEvent
,
addTransferListener(TransferListener)
public void fireTransferStarted(TransferEvent transferEvent)
TransferEvent
to all registered listeners (calls method TransferListener.transferStarted(TransferEvent)
on all of
them}. The Event should be of type TransferEvent.TRANSFER_COMPLETED
transferEvent
- the TransferEvent which will be dispatched to listenerspublic void fireTransferProgress(TransferEvent transferEvent, byte[] buffer, int length)
TransferEvent
to all registered listeners (calls method TransferListener.transferProgress(TransferEvent, byte[], int)
on all of them). The Event should be of type TransferEvent.TRANSFER_PROGRESS
.transferEvent
- the TransferEvent which will be dispatched to listenersbuffer
- the buffer containing the additional contentlength
- the length of the content in the bufferpublic void fireTransferCompleted(TransferEvent transferEvent)
TransferEvent
to all registered listeners (calls method TransferListener.transferCompleted(TransferEvent)
on all of
them}. The Event should be of type TransferEvent.TRANSFER_COMPLETED
transferEvent
- the TransferEvent which will be dispatched to listenerspublic void fireTransferError(TransferEvent transferEvent)
TransferEvent
to all registered listeners (calls method TransferListener.transferError(TransferEvent)
on all of them.
The Event should be of type TransferEvent.TRANSFER_ERROR
and it is expected that
TransferEvent.getException()
} method will return not null valuetransferEvent
- the TransferEvent which will be dispatched to listenerspublic void fireDebug(String message)
TransferListener.debug(String)
on all of them.message
- the debug message which will be dispatched to listenerspublic void fireTransferInitiated(TransferEvent transferEvent)
TransferEvent
to all registered listeners (calls method TransferListener.transferInitiated(TransferEvent)
on all of
them. The Event should be of type TransferEvent.TRANSFER_INITIATED
.transferEvent
- the TransferEvent which will be dispatched to listenersCopyright © 2003–2014 The Apache Software Foundation. All rights reserved.