org.apache.maven.wagon.events
Class TransferEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.apache.maven.wagon.events.WagonEvent
          extended by 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 respository

Version:
$Id: TransferEvent.java 162476 2005-04-19 02:49:45Z brett $
Author:
Michal Maczka
See Also:
Serialized Form

Field Summary
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
           
private  Resource resource
           
static int TRANSFER_COMPLETED
          A transfer is completed.
static int TRANSFER_ERROR
          An error occured 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.
 
Fields inherited from class org.apache.maven.wagon.events.WagonEvent
repository, timestamp
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
TransferEvent(Wagon wagon, Resource resource, java.lang.Exception exception, int requestType)
           
TransferEvent(Wagon wagon, Resource resource, int eventType, int requestType)
           
 
Method Summary
 int getEventType()
           
 java.lang.Exception getException()
           
 java.io.File getLocalFile()
           
 int getRequestType()
          Returns the request type.
 Resource getResource()
           
 void setEventType(int eventType)
           
 void setLocalFile(java.io.File localFile)
           
 void setRequestType(int requestType)
          Sets the request type
 void setResource(Resource resource)
           
 
Methods inherited from class org.apache.maven.wagon.events.WagonEvent
getTimestamp, getWagon, setTimestamp
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 occured 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
Constructor Detail

TransferEvent

public TransferEvent(Wagon wagon,
                     Resource resource,
                     int eventType,
                     int requestType)

TransferEvent

public TransferEvent(Wagon wagon,
                     Resource resource,
                     java.lang.Exception exception,
                     int requestType)
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_GET or TransferEvent.REQUEST_PUT

setRequestType

public void setRequestType(int requestType)
Sets the request type

Parameters:
requestType - The requestType to set. The Request type value should be either TransferEvent.REQUEST_GET or TransferEvent.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.