org.neociclo.odetteftp.oftplet
Interface OftpletSpeaker

All Known Subinterfaces:
OftpletEventListener
All Known Implementing Classes:
OftpletEventListenerAdapter, SharedQueueOftpletSpeaker

public interface OftpletSpeaker

Version:
$Rev: 461 $ $Date: 2010-07-02 08:06:37 -0300 (Fri, 02 Jul 2010) $
Author:
Rafael Marins

Method Summary
 OdetteFtpObject nextOftpObjectToSend()
           
 void onDataSent(VirtualFile virtualFile, long totalOctetsSent)
           
 void onNotificationSent(DeliveryNotification notif)
           
 void onSendFileEnd(VirtualFile virtualFile)
          Callback method invoked when the file is fully transmitted.
 void onSendFileError(VirtualFile virtualFile, AnswerReasonInfo reason, boolean retryLater)
          Callback method to indicate the transmitting file is not accepted by the other peer - being in the Speaker state.
 void onSendFileStart(VirtualFile virtualFile, long answerCount)
          Callback method to indicate the given file transfer will begin.
 

Method Detail

nextOftpObjectToSend

OdetteFtpObject nextOftpObjectToSend()

onSendFileStart

void onSendFileStart(VirtualFile virtualFile,
                     long answerCount)
Callback method to indicate the given file transfer will begin. Called after the receive of Start File Positive Answer (SFPA) command while in the Speaker state, just before the first DATA command is released.

Parameters:
virtualFile - the bundle of transfer info and virtual file being transferred.
answerCount - negotiated restart offset

onDataSent

void onDataSent(VirtualFile virtualFile,
                long totalOctetsSent)

onSendFileEnd

void onSendFileEnd(VirtualFile virtualFile)
Callback method invoked when the file is fully transmitted. It happens after receiving the End File Positive Answer (EFNA) command while in the Speaker state.

Parameters:
virtualFile -

onSendFileError

void onSendFileError(VirtualFile virtualFile,
                     AnswerReasonInfo reason,
                     boolean retryLater)
Callback method to indicate the transmitting file is not accepted by the other peer - being in the Speaker state. It is always the case when receiving a Start File Negative Answer (SFNA) and End File Negative Answer (EFNA) protocol commands.

Any other kind of error, such as IoException or FileTransferException, it should be handled by the Oftplet.onExceptionCaught(Throwable) method.

Parameters:
virtualFile -
reason -
reasonText -
retryLater -

onNotificationSent

void onNotificationSent(DeliveryNotification notif)


ACCORD