org.apache.maven.wagon.events
Class TransferEventSupport
java.lang.Object
org.apache.maven.wagon.events.TransferEventSupport
public final class TransferEventSupport
extends java.lang.Object
The class allows registration and removal of event listners of type
TransferListener and dispatch of those events to those listeners
$Id: TransferEventSupport.java 162476 2005-04-19 02:49:45Z brett $
addTransferListener
public void addTransferListener(TransferListener listener)
Adds the listener to the collection of listeners
who will be notifed when any transfer event occurs
in this Wagon
object.
If listener is null
, no exception is thrown and no action is performed
listener
- the transfer listener
fireDebug
public void fireDebug(String message)
message
- the debug message which will be dispached to listeners
fireTransferCompleted
public void fireTransferCompleted(TransferEvent transferEvent)
transferEvent
- the TransferEvent which will be dispached to listeners
fireTransferError
public void fireTransferError(TransferEvent transferEvent)
transferEvent
- the TransferEvent which will be dispached to listeners
fireTransferInitiated
public void fireTransferInitiated(TransferEvent transferEvent)
transferEvent
- the TransferEvent which will be dispached to listeners
fireTransferProgress
public void fireTransferProgress(TransferEvent transferEvent,
byte[] buffer,
int length)
transferEvent
- the TransferEvent which will be dispached to listenersbuffer
- the buffer containing the additional contentlength
- the length of the content in the buffer
fireTransferStarted
public void fireTransferStarted(TransferEvent transferEvent)
transferEvent
- the TransferEvent which will be dispached to listeners
hasTransferListener
public boolean hasTransferListener(TransferListener listener)
Returns whether the specified instance of transfer
listener was added to the collection of listeners
who will be notifed when an transfer event occurs
listener
- the transfer listener
true
if given listner was added to the collection of listeners
false
otherwise
removeTransferListener
public void removeTransferListener(TransferListener listener)
Removes the transfer listener from the collection of listeners so
it no longer receives transfer events.
If listener is null
or specified listener was not added
to this TransferEventSupport
object
no exception is thrown and no action is performed
listener
- the transfer listener