Package org.apache.maven.wagon.events
Class TransferEvent
- java.lang.Object
-
- java.util.EventObject
-
- org.apache.maven.wagon.events.WagonEvent
-
- org.apache.maven.wagon.events.TransferEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class TransferEvent extends WagonEvent
TransferEvent is used to notify TransferListeners about progress in transfer of resources form/to the repository- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private inteventTypeprivate java.lang.Exceptionexceptionprivate java.io.FilelocalFilestatic intREQUEST_GETIndicates GET transfer (from the repository)static intREQUEST_PUTIndicates PUT transfer (to the repository)private intrequestTypeprivate Resourceresourcestatic intTRANSFER_COMPLETEDA transfer is completed.static intTRANSFER_ERRORAn error occurred during transferstatic intTRANSFER_INITIATEDA transfer was attempted, but has not yet commenced.static intTRANSFER_PROGRESSA transfer is in progress.static intTRANSFER_STARTEDA transfer was started.-
Fields inherited from class org.apache.maven.wagon.events.WagonEvent
timestamp
-
-
Constructor Summary
Constructors Constructor Description TransferEvent(Wagon wagon, Resource resource, int eventType, int requestType)TransferEvent(Wagon wagon, Resource resource, java.lang.Exception exception, int requestType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)intgetEventType()java.lang.ExceptiongetException()java.io.FilegetLocalFile()intgetRequestType()Returns the request type.ResourcegetResource()inthashCode()voidsetEventType(int eventType)voidsetLocalFile(java.io.File localFile)voidsetRequestType(int requestType)Sets the request typevoidsetResource(Resource resource)java.lang.StringtoString()-
Methods inherited from class org.apache.maven.wagon.events.WagonEvent
getTimestamp, getWagon, setTimestamp
-
-
-
-
Field Detail
-
TRANSFER_INITIATED
public static final int TRANSFER_INITIATED
A transfer was attempted, but has not yet commenced.- See Also:
- Constant Field Values
-
TRANSFER_STARTED
public static final int TRANSFER_STARTED
A transfer was started.- See Also:
- Constant Field Values
-
TRANSFER_COMPLETED
public static final int TRANSFER_COMPLETED
A transfer is completed.- See Also:
- Constant Field Values
-
TRANSFER_PROGRESS
public static final int TRANSFER_PROGRESS
A transfer is in progress.- See Also:
- Constant Field Values
-
TRANSFER_ERROR
public static final int TRANSFER_ERROR
An error occurred during transfer- See Also:
- Constant Field Values
-
REQUEST_GET
public static final int REQUEST_GET
Indicates GET transfer (from the repository)- See Also:
- Constant Field Values
-
REQUEST_PUT
public static final int REQUEST_PUT
Indicates PUT transfer (to the repository)- See Also:
- Constant Field Values
-
resource
private Resource resource
-
eventType
private int eventType
-
requestType
private int requestType
-
exception
private java.lang.Exception exception
-
localFile
private java.io.File localFile
-
-
Method Detail
-
getResource
public Resource getResource()
- Returns:
- Returns the resource.
-
getException
public java.lang.Exception getException()
- Returns:
- Returns the exception.
-
getRequestType
public int getRequestType()
Returns the request type.- Returns:
- Returns the request type. The Request type is one of
TransferEvent.REQUEST_GETorTransferEvent.REQUEST_PUT
-
setRequestType
public void setRequestType(int requestType)
Sets the request type- Parameters:
requestType- The requestType to set. The Request type value should be eitherTransferEvent.REQUEST_GETorTransferEvent.REQUEST_PUT.- Throws:
java.lang.IllegalArgumentException- when
-
getEventType
public int getEventType()
- Returns:
- Returns the eventType.
-
setEventType
public void setEventType(int eventType)
- Parameters:
eventType- The eventType to set.
-
setResource
public void setResource(Resource resource)
- Parameters:
resource- The resource to set.
-
getLocalFile
public java.io.File getLocalFile()
- Returns:
- Returns the local file.
-
setLocalFile
public void setLocalFile(java.io.File localFile)
- Parameters:
localFile- The local file to set.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.util.EventObject
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-