public class ArtifactTransferEvent
extends java.util.EventObject
Modifier and Type | Field and Description |
---|---|
private ArtifactTransferResource |
artifact |
private byte[] |
dataBuffer |
private int |
dataLength |
private int |
dataOffset |
private int |
eventType |
private java.lang.Exception |
exception |
private java.io.File |
localFile |
static int |
REQUEST_GET
Indicates GET transfer (from the repository)
|
static int |
REQUEST_PUT
Indicates PUT transfer (to the repository)
|
private int |
requestType |
static int |
TRANSFER_COMPLETED
A transfer is completed.
|
static int |
TRANSFER_ERROR
An error occurred during transfer
|
static int |
TRANSFER_INITIATED
A transfer was attempted, but has not yet commenced.
|
static int |
TRANSFER_PROGRESS
A transfer is in progress.
|
static int |
TRANSFER_STARTED
A transfer was started.
|
private long |
transferredBytes |
Constructor and Description |
---|
ArtifactTransferEvent(java.lang.String wagon,
java.lang.Exception exception,
int requestType,
ArtifactTransferResource artifact) |
ArtifactTransferEvent(java.lang.String wagon,
int eventType,
int requestType,
ArtifactTransferResource artifact) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
byte[] |
getDataBuffer() |
int |
getDataLength() |
int |
getDataOffset() |
int |
getEventType() |
java.lang.Exception |
getException() |
java.io.File |
getLocalFile() |
int |
getRequestType()
Returns the request type.
|
ArtifactTransferResource |
getResource() |
long |
getTransferredBytes() |
int |
hashCode() |
void |
setDataBuffer(byte[] dataBuffer) |
void |
setDataLength(int dataLength) |
void |
setDataOffset(int dataOffset) |
void |
setEventType(int eventType) |
void |
setLocalFile(java.io.File localFile) |
void |
setRequestType(int requestType)
Sets the request type
|
void |
setTransferredBytes(long transferredBytes) |
java.lang.String |
toString() |
public static final int TRANSFER_INITIATED
public static final int TRANSFER_STARTED
public static final int TRANSFER_COMPLETED
public static final int TRANSFER_PROGRESS
public static final int TRANSFER_ERROR
public static final int REQUEST_GET
public static final int REQUEST_PUT
private int eventType
private int requestType
private java.lang.Exception exception
private java.io.File localFile
private ArtifactTransferResource artifact
private long transferredBytes
private byte[] dataBuffer
private int dataOffset
private int dataLength
public ArtifactTransferEvent(java.lang.String wagon, int eventType, int requestType, ArtifactTransferResource artifact)
public ArtifactTransferEvent(java.lang.String wagon, java.lang.Exception exception, int requestType, ArtifactTransferResource artifact)
public ArtifactTransferResource getResource()
public java.lang.Exception getException()
public int getRequestType()
TransferEvent.REQUEST_GET
or TransferEvent.REQUEST_PUT
public void setRequestType(int requestType)
requestType
- The requestType to set.
The Request type value should be either
TransferEvent.REQUEST_GET
or TransferEvent.REQUEST_PUT
.java.lang.IllegalArgumentException
- whenpublic int getEventType()
public void setEventType(int eventType)
eventType
- The eventType to set.public java.io.File getLocalFile()
public void setLocalFile(java.io.File localFile)
localFile
- The local file to set.public long getTransferredBytes()
public void setTransferredBytes(long transferredBytes)
public byte[] getDataBuffer()
public void setDataBuffer(byte[] dataBuffer)
public int getDataOffset()
public void setDataOffset(int dataOffset)
public int getDataLength()
public void setDataLength(int dataLength)
public java.lang.String toString()
toString
in class java.util.EventObject
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object