org.neociclo.odetteftp.protocol.v13
Class OdetteFtpVer13Handler
java.lang.Object
org.neociclo.odetteftp.protocol.DefaultHandler
org.neociclo.odetteftp.protocol.v13.OdetteFtpVer13Handler
- All Implemented Interfaces:
- ProtocolHandler
- Direct Known Subclasses:
- OdetteFtpVer14Handler
public class OdetteFtpVer13Handler
- extends DefaultHandler
- Version:
- $Rev: 770 $ $Date: 2010-10-08 12:49:27 -0300 (Fri, 08 Oct 2010) $
- Author:
- Rafael Marins
Method Summary |
void |
authenticationChallengeReceived(OdetteFtpSession session,
CommandExchangeBuffer command)
Decrypts the challenge using the user private key and sends the decrypted
challenge back to the remote peer in the Authentication Response (AURP). |
void |
authenticationResponseReceived(OdetteFtpSession session,
CommandExchangeBuffer command)
|
protected AnswerReasonInfo |
buildAnswerReasonInfoObject(CommandExchangeBuffer response)
|
protected CommandExchangeBuffer |
buildDeliveryNotificationCommand(DeliveryNotification notif)
|
protected CommandExchangeBuffer |
buildEndFileCommand(long recordCount,
long unitCount)
|
protected CommandExchangeBuffer |
buildEndFileNegativeAnswerCommand(AnswerReason reason,
String reasonText)
|
protected CommandExchangeBuffer |
buildEndFilePositiveAnswerCommand(boolean changeDirection)
|
protected CommandExchangeBuffer |
buildEndSessionCommand(EndSessionReason reason,
String reasonText)
|
protected EndSessionReasonInfo |
buildEndSessionReasonInfoObject(CommandExchangeBuffer response)
|
protected DeliveryNotification |
buildEndToEndResponse(CommandExchangeBuffer eerp)
|
protected DeliveryNotification |
buildNegativeEndResponse(CommandExchangeBuffer nerp)
|
protected CommandExchangeBuffer |
buildReadyToReceiveCommand()
|
protected CommandExchangeBuffer |
buildStartFileCommand(OdetteFtpSession session,
VirtualFile vf)
|
protected CommandExchangeBuffer |
buildStartFileNegativeAnswerCommand(AnswerReason reason,
String reasonText,
boolean retryLater)
|
protected CommandExchangeBuffer |
buildStartFilePositiveAnswerCommand(long answerCount)
|
protected CommandExchangeBuffer |
buildStartSessionCommand(String code,
String pswd,
String userData,
OdetteFtpSession session)
|
protected DefaultVirtualFile |
buildVirtualFileObject(OdetteFtpSession session,
CommandExchangeBuffer sfid)
|
void |
negativeEndReponseReceived(OdetteFtpSession session,
CommandExchangeBuffer command)
|
Date |
parseDateTime(String sdate,
String stime)
|
protected long |
protocolMaxFileSizeSupported()
|
void |
securityChangeDirectionReceived(OdetteFtpSession session,
CommandExchangeBuffer command)
|
Methods inherited from class org.neociclo.odetteftp.protocol.DefaultHandler |
abnormalRelease, abort, afterStartSession, buildSetCreditCommand, changeDirectionReceived, checkSessionParamsViolation, consumeIncomingCredits, consumeOutgoingCredits, dataBufferReceived, endFileNegativeAnswerReceived, endFilePositiveAnswerReceived, endFileReceived, endSessionReceived, endToEndResponseReceived, handleCallback, initiatorStartSessionReceived, normalizeVirtualFile, protocolRelease, readyMessageReceived, readyToReceiveReceived, release, resetIncomingCredits, resetOutgoingCredits, responderSendStartSession, sessionConnected, setCreditReceived, speakerChangeDirection, speakerChangeDirectionPreventingLoop, speakerDeliveryNotification, speakerEndFile, speakerSendData, speakerStartFile, speakerTransmitRequests, startFileNegativeAnswerReceived, startFilePositiveAnswerReceived, startFileReceived, startSessionPasswordAuthentication, startSessionReceived |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_TRANSMITTED_FILE_SIZE_VER13
protected static final long MAX_TRANSMITTED_FILE_SIZE_VER13
- Maximum supported file size blocks in Odette FTP v1.3.
- See Also:
- Constant Field Values
OdetteFtpVer13Handler
public OdetteFtpVer13Handler()
authenticationChallengeReceived
public void authenticationChallengeReceived(OdetteFtpSession session,
CommandExchangeBuffer command)
throws OdetteFtpException
- Description copied from interface:
ProtocolHandler
- Decrypts the challenge using the user private key and sends the decrypted
challenge back to the remote peer in the Authentication Response (AURP).
The first authentication message must be sent by the Initiator.
1. Initiator -- SECD ------------> Responder Change Direction
2. <------------ AUCH -- Challenge
3. -- AURP ------------> Response
4. <------------ SECD -- Change Direction
5. -- AUCH ------------> Challenge
6. <------------ AURP -- Response
- Throws:
OdetteFtpException
authenticationResponseReceived
public void authenticationResponseReceived(OdetteFtpSession session,
CommandExchangeBuffer command)
throws OdetteFtpException
- Throws:
OdetteFtpException
negativeEndReponseReceived
public void negativeEndReponseReceived(OdetteFtpSession session,
CommandExchangeBuffer command)
throws OdetteFtpException
- Throws:
OdetteFtpException
buildNegativeEndResponse
protected DeliveryNotification buildNegativeEndResponse(CommandExchangeBuffer nerp)
throws OdetteFtpException
- Specified by:
buildNegativeEndResponse
in class DefaultHandler
- Throws:
OdetteFtpException
securityChangeDirectionReceived
public void securityChangeDirectionReceived(OdetteFtpSession session,
CommandExchangeBuffer command)
throws OdetteFtpException
- Throws:
OdetteFtpException
protocolMaxFileSizeSupported
protected long protocolMaxFileSizeSupported()
- Specified by:
protocolMaxFileSizeSupported
in class DefaultHandler
buildStartSessionCommand
protected CommandExchangeBuffer buildStartSessionCommand(String code,
String pswd,
String userData,
OdetteFtpSession session)
- Specified by:
buildStartSessionCommand
in class DefaultHandler
buildEndToEndResponse
protected DeliveryNotification buildEndToEndResponse(CommandExchangeBuffer eerp)
- Specified by:
buildEndToEndResponse
in class DefaultHandler
buildEndSessionCommand
protected CommandExchangeBuffer buildEndSessionCommand(EndSessionReason reason,
String reasonText)
- Specified by:
buildEndSessionCommand
in class DefaultHandler
parseDateTime
public Date parseDateTime(String sdate,
String stime)
buildStartFileCommand
protected CommandExchangeBuffer buildStartFileCommand(OdetteFtpSession session,
VirtualFile vf)
- Specified by:
buildStartFileCommand
in class DefaultHandler
buildEndFilePositiveAnswerCommand
protected CommandExchangeBuffer buildEndFilePositiveAnswerCommand(boolean changeDirection)
- Specified by:
buildEndFilePositiveAnswerCommand
in class DefaultHandler
buildStartFilePositiveAnswerCommand
protected CommandExchangeBuffer buildStartFilePositiveAnswerCommand(long answerCount)
- Specified by:
buildStartFilePositiveAnswerCommand
in class DefaultHandler
buildEndFileNegativeAnswerCommand
protected CommandExchangeBuffer buildEndFileNegativeAnswerCommand(AnswerReason reason,
String reasonText)
- Specified by:
buildEndFileNegativeAnswerCommand
in class DefaultHandler
buildStartFileNegativeAnswerCommand
protected CommandExchangeBuffer buildStartFileNegativeAnswerCommand(AnswerReason reason,
String reasonText,
boolean retryLater)
- Specified by:
buildStartFileNegativeAnswerCommand
in class DefaultHandler
buildVirtualFileObject
protected DefaultVirtualFile buildVirtualFileObject(OdetteFtpSession session,
CommandExchangeBuffer sfid)
throws OdetteFtpException
- Specified by:
buildVirtualFileObject
in class DefaultHandler
- Throws:
OdetteFtpException
buildAnswerReasonInfoObject
protected AnswerReasonInfo buildAnswerReasonInfoObject(CommandExchangeBuffer response)
throws OdetteFtpException
- Specified by:
buildAnswerReasonInfoObject
in class DefaultHandler
- Throws:
OdetteFtpException
buildEndFileCommand
protected CommandExchangeBuffer buildEndFileCommand(long recordCount,
long unitCount)
- Specified by:
buildEndFileCommand
in class DefaultHandler
buildDeliveryNotificationCommand
protected CommandExchangeBuffer buildDeliveryNotificationCommand(DeliveryNotification notif)
- Specified by:
buildDeliveryNotificationCommand
in class DefaultHandler
buildEndSessionReasonInfoObject
protected EndSessionReasonInfo buildEndSessionReasonInfoObject(CommandExchangeBuffer response)
throws OdetteFtpException
- Specified by:
buildEndSessionReasonInfoObject
in class DefaultHandler
- Throws:
OdetteFtpException
buildReadyToReceiveCommand
protected CommandExchangeBuffer buildReadyToReceiveCommand()
- Specified by:
buildReadyToReceiveCommand
in class DefaultHandler
ACCORD