Package org.apache.maven.repository
Class ArtifactTransferEvent
java.lang.Object
java.util.EventObject
org.apache.maven.repository.ArtifactTransferEvent
- All Implemented Interfaces:
- Serializable
TransferEvent is used to notify TransferListeners about progress
 in transfer of resources form/to the repository
- Author:
- Michal Maczka
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intIndicates GET transfer (from the repository)static final intIndicates PUT transfer (to the repository)static final intA transfer is completed.static final intAn error occurred during transferstatic final intA transfer was attempted, but has not yet commenced.static final intA transfer is in progress.static final intA transfer was started.Fields inherited from class java.util.EventObjectsource
- 
Constructor SummaryConstructorsConstructorDescriptionArtifactTransferEvent(String wagon, int eventType, int requestType, ArtifactTransferResource artifact) ArtifactTransferEvent(String wagon, Exception exception, int requestType, ArtifactTransferResource artifact) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanbyte[]intintintintReturns the request type.longinthashCode()voidsetDataBuffer(byte[] dataBuffer) voidsetDataLength(int dataLength) voidsetDataOffset(int dataOffset) voidsetEventType(int eventType) voidsetLocalFile(File localFile) voidsetRequestType(int requestType) Sets the request typevoidsetTransferredBytes(long transferredBytes) toString()Methods inherited from class java.util.EventObjectgetSource
- 
Field Details- 
TRANSFER_INITIATEDpublic static final int TRANSFER_INITIATEDA transfer was attempted, but has not yet commenced.- See Also:
 
- 
TRANSFER_STARTEDpublic static final int TRANSFER_STARTEDA transfer was started.- See Also:
 
- 
TRANSFER_COMPLETEDpublic static final int TRANSFER_COMPLETEDA transfer is completed.- See Also:
 
- 
TRANSFER_PROGRESSpublic static final int TRANSFER_PROGRESSA transfer is in progress.- See Also:
 
- 
TRANSFER_ERRORpublic static final int TRANSFER_ERRORAn error occurred during transfer- See Also:
 
- 
REQUEST_GETpublic static final int REQUEST_GETIndicates GET transfer (from the repository)- See Also:
 
- 
REQUEST_PUTpublic static final int REQUEST_PUTIndicates PUT transfer (to the repository)- See Also:
 
 
- 
- 
Constructor Details- 
ArtifactTransferEventpublic ArtifactTransferEvent(String wagon, int eventType, int requestType, ArtifactTransferResource artifact) 
- 
ArtifactTransferEventpublic ArtifactTransferEvent(String wagon, Exception exception, int requestType, ArtifactTransferResource artifact) 
 
- 
- 
Method Details- 
getResource
- 
getException- Returns:
- Returns the exception.
 
- 
getRequestTypepublic int getRequestType()Returns the request type.- Returns:
- Returns the request type. The Request type is one of
         TransferEvent.REQUEST_GETorTransferEvent.REQUEST_PUT
 
- 
setRequestTypepublic void setRequestType(int requestType) Sets the request type- Parameters:
- requestType- The requestType to set. The Request type value should be either- TransferEvent.REQUEST_GETor- TransferEvent.REQUEST_PUT.
- Throws:
- IllegalArgumentException- when
 
- 
getEventTypepublic int getEventType()- Returns:
- Returns the eventType.
 
- 
setEventTypepublic void setEventType(int eventType) - Parameters:
- eventType- The eventType to set.
 
- 
getLocalFile- Returns:
- Returns the local file.
 
- 
setLocalFile- Parameters:
- localFile- The local file to set.
 
- 
getTransferredBytespublic long getTransferredBytes()
- 
setTransferredBytespublic void setTransferredBytes(long transferredBytes) 
- 
getDataBufferpublic byte[] getDataBuffer()
- 
setDataBufferpublic void setDataBuffer(byte[] dataBuffer) 
- 
getDataOffsetpublic int getDataOffset()
- 
setDataOffsetpublic void setDataOffset(int dataOffset) 
- 
getDataLengthpublic int getDataLength()
- 
setDataLengthpublic void setDataLength(int dataLength) 
- 
toString- Overrides:
- toStringin class- EventObject
 
- 
hashCodepublic int hashCode()
- 
equals
 
-