com.ibm.eNetwork.ECL.event
Class ECLXferEvent

java.lang.Object
  |
  +--com.ibm.eNetwork.ECL.event.ECLEvent
        |
        +--com.ibm.eNetwork.ECL.event.ECLProgressEvent
              |
              +--com.ibm.eNetwork.ECL.event.ECLXferEvent

public class ECLXferEvent
extends ECLProgressEvent

Event fired to notify listeners of progress during file transfers.


Fields inherited from class com.ibm.eNetwork.ECL.event.ECLProgressEvent
CANCEL, END, PROGRESS, START
 
Constructor Summary
ECLXferEvent(java.lang.Object source, long bytesSent, long bytesToSend, java.lang.String sourceFile, java.lang.String targetFile, boolean receive)
          Constructor for generating a new ECLXferEvent.
ECLXferEvent(java.lang.Object source, long bytesSent, long bytesToSend, java.lang.String sourceFile, java.lang.String targetFile, boolean receive, int type)
          Constructor for generating a new ECLXferEvent.
ECLXferEvent(java.lang.Object source, long bytesSent, java.lang.String sourceFile, java.lang.String targetFile, boolean receive)
          Constructor for generating a new ECLXferEvent when the size of the file is not known.
ECLXferEvent(java.lang.Object source, long bytesSent, java.lang.String sourceFile, java.lang.String targetFile, boolean receive, int type)
          Constructor for generating a new ECLXferEvent when the size of the file is not known.
 
Method Summary
 long GetBytesSent()
          Returns the total number of bytes sent.
 long GetBytesToSend()
          Returns the total number of bytes to be sent.
 ECLXfer GetECLXfer()
          Returns the instance of ECLXfer associated with this event.
 java.lang.String GetSourceFile()
          Returns the source file for this transfer event.
 java.lang.String GetTargetFile()
          Returns the target file for this transfer event.
 boolean IsReceive()
          Determines whether this event is for a receive or send operation.
 java.lang.String toString()
          Returns a String representation of the event.
 
Methods inherited from class com.ibm.eNetwork.ECL.event.ECLProgressEvent
GetType, GetUnitsDone, GetUnitsToDo
 
Methods inherited from class com.ibm.eNetwork.ECL.event.ECLEvent
GetSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ECLXferEvent

public ECLXferEvent(java.lang.Object source,
                    long bytesSent,
                    java.lang.String sourceFile,
                    java.lang.String targetFile,
                    boolean receive)
Constructor for generating a new ECLXferEvent when the size of the file is not known.
Parameters:
source - The source of the event.
bytesSent - The number of bytes sent so far.
sourceFile - The source file for the transfer.
targetFile - The target file for the transfer.
receive - True if receiving, false if sending.

ECLXferEvent

public ECLXferEvent(java.lang.Object source,
                    long bytesSent,
                    java.lang.String sourceFile,
                    java.lang.String targetFile,
                    boolean receive,
                    int type)
Constructor for generating a new ECLXferEvent when the size of the file is not known.
Parameters:
source - The source of the event.
bytesSent - The number of bytes sent so far.
sourceFile - The source file for the transfer.
targetFile - The target file for the transfer.
receive - True if receiving, false if sending.
type - The type of event.

ECLXferEvent

public ECLXferEvent(java.lang.Object source,
                    long bytesSent,
                    long bytesToSend,
                    java.lang.String sourceFile,
                    java.lang.String targetFile,
                    boolean receive)
Constructor for generating a new ECLXferEvent.
Parameters:
source - The source of the event.
bytesSent - The number of bytes sent so far.
bytesToSend - The total number of bytes to be sent.
sourceFile - The source file for the transfer.
targetFile - The target file for the transfer.
receive - True if receiving, false if sending.

ECLXferEvent

public ECLXferEvent(java.lang.Object source,
                    long bytesSent,
                    long bytesToSend,
                    java.lang.String sourceFile,
                    java.lang.String targetFile,
                    boolean receive,
                    int type)
Constructor for generating a new ECLXferEvent.
Parameters:
source - The source of the event.
bytesSent - The number of bytes sent so far.
bytesToSend - The total number of bytes to be sent.
sourceFile - The source file for the transfer.
targetFile - The target file for the transfer.
receive - True if receiving, false if sending.
type - The type of event.
Method Detail

GetECLXfer

public ECLXfer GetECLXfer()
Returns the instance of ECLXfer associated with this event.

GetSourceFile

public java.lang.String GetSourceFile()
Returns the source file for this transfer event. If the event is for a receive operation, it is the name of the host file. If the event is for a send operation, it is the name of the local file.

GetTargetFile

public java.lang.String GetTargetFile()
Returns the target file for this transfer event. If the event is for a receive operation, it is the name of the local file. If the event is for a send operation, it is the name of the host file.

GetBytesSent

public long GetBytesSent()
Returns the total number of bytes sent.

GetBytesToSend

public long GetBytesToSend()
Returns the total number of bytes to be sent. If the size of a file is unknown or if the event is for a receive operation, this method will return -1.

IsReceive

public boolean IsReceive()
Determines whether this event is for a receive or send operation.
Returns:
true if receiving, false if sending.

toString

public java.lang.String toString()
Returns a String representation of the event.
Overrides:
toString in class ECLEvent