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
- See Also:
TransferEvent
,
addTransferListener(TransferListener)
-
fireTransferStarted
public void fireTransferStarted(TransferEvent transferEvent)
Dispatches the given TransferEvent
to all registered listeners (calls method TransferListener.transferStarted(TransferEvent)
on all of
them}. The Event should be of type TransferEvent.TRANSFER_COMPLETED
- Parameters:
transferEvent
- the TransferEvent which will be dispatched to listeners
-
fireTransferProgress
public 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). The Event should be of type TransferEvent.TRANSFER_PROGRESS
.
- Parameters:
transferEvent
- the TransferEvent which will be dispatched to listeners
buffer
- the buffer containing the additional content
length
- the length of the content in the buffer
-
fireTransferCompleted
public void fireTransferCompleted(TransferEvent transferEvent)
Dispatches the given TransferEvent
to all registered listeners (calls method TransferListener.transferCompleted(TransferEvent)
on all of
them}. The Event should be of type TransferEvent.TRANSFER_COMPLETED
- Parameters:
transferEvent
- the TransferEvent which will be dispatched to listeners
-
fireTransferError
public void fireTransferError(TransferEvent transferEvent)
Dispatches the given 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 value
- Parameters:
transferEvent
- the TransferEvent which will be dispatched to listeners
-
fireDebug
public void fireDebug(String message)
Dispatches the given debug message
to all registered listeners (calls method TransferListener.debug(String)
on all of them.
- Parameters:
message
- the debug message which will be dispatched to listeners
-
fireTransferInitiated
public void fireTransferInitiated(TransferEvent transferEvent)
Dispatches the given TransferEvent
to all registered listeners (calls method TransferListener.transferInitiated(TransferEvent)
on all of
them. The Event should be of type TransferEvent.TRANSFER_INITIATED
.
- Parameters:
transferEvent
- the TransferEvent which will be dispatched to listeners
Copyright © 2003–2022 The Apache Software Foundation. All rights reserved.