|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.neociclo.odetteftp.protocol.DefaultHandler
public abstract class DefaultHandler
Constructor Summary | |
---|---|
DefaultHandler()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.neociclo.odetteftp.ProtocolHandler |
---|
authenticationChallengeReceived, authenticationResponseReceived, negativeEndReponseReceived, securityChangeDirectionReceived |
Constructor Detail |
---|
public DefaultHandler()
Method Detail |
---|
public void abnormalRelease(OdetteFtpSession session, EndSessionReason error, String errorText) throws OdetteFtpException
ProtocolHandler
abnormalRelease
in interface ProtocolHandler
EndSessionException
- a raising exception for the given End Session error to user
agent.
OdetteFtpException
public void abort(OdetteFtpSession session, EndSessionReason error, String errorText) throws OdetteFtpException
abort
in interface ProtocolHandler
OdetteFtpException
public void startSessionReceived(OdetteFtpSession session, CommandExchangeBuffer ssid) throws OdetteFtpException
ProtocolHandler
Protocol Sequence
1. Initiator <-------------SSRM -- Responder Ready Message 2. -- SSID ------------> Identification 3. <------------ SSID -- Identification
startSessionReceived
in interface ProtocolHandler
OdetteFtpException
public void afterStartSession(OdetteFtpSession session) throws OdetteFtpException
afterStartSession
in interface ProtocolHandler
OdetteFtpException
public void changeDirectionReceived(OdetteFtpSession session) throws OdetteFtpException
changeDirectionReceived
in interface ProtocolHandler
OdetteFtpException
public void startFileReceived(OdetteFtpSession session, CommandExchangeBuffer sfid) throws OdetteFtpException
startFileReceived
in interface ProtocolHandler
OdetteFtpException
public void dataBufferReceived(OdetteFtpSession session, DataExchangeBuffer data) throws OdetteFtpException
dataBufferReceived
in interface ProtocolHandler
OdetteFtpException
public void endFileReceived(OdetteFtpSession session, CommandExchangeBuffer efid) throws OdetteFtpException
endFileReceived
in interface ProtocolHandler
OdetteFtpException
public void sessionConnected(OdetteFtpSession session) throws OdetteFtpException
ProtocolHandler
Answer attended calls with a Start Session Ready Message command when this ODETTE FTP entity is the Responder. Otherwise, do nothing else of expecting same command from the peer.
The Start Session phase is entered immediately after the network connection has been established. The ODETTE FTP entity that took the initiative to establish the network connection becomes the Initiator. It's peer becomes the Responder.
The first message must be sent by the Responder.
Protocol Sequence
1. Initiator <-------------SSRM -- Responder Ready Message 2. -- SSID ------------> Identification 3. <------------ SSID -- Identification
sessionConnected
in interface ProtocolHandler
OdetteFtpException
public void readyToReceiveReceived(OdetteFtpSession session) throws OdetteFtpException
ProtocolHandler
In order to avoid congestion between two adjacent nodes caused by a continuous flow of EERPs and NERPs, a Ready To Receive (RTR) command is provided. The RTR acts as an EERP/NERP acknowledgement for flow control but has no end-to-end significance.
Protocol Sequence
1. Speaker -- EERP ------------> Listener End to End Response 2. <------------- RTR -- Ready to Receive 3. -- EERP ------------> End to End Response 4. <------------- RTR -- Ready to Receive 5. -- NERP ------------> Negative End Response 6. <------------- RTR -- Ready to Receive 7. -- SFID ------------> Start File or 8. -- CD --------------> Exchange the turnAfter sending an EERP or NERP, the Speaker must wait for an RTR before sending any other commands. The only acceptable commands to follow are:
EERP NERP SFID or CD (if there are no more EERPs or NERPs to be sent)
readyToReceiveReceived
in interface ProtocolHandler
OdetteFtpException
public void setCreditReceived(OdetteFtpSession session, CommandExchangeBuffer cdt) throws OdetteFtpException
setCreditReceived
in interface ProtocolHandler
OdetteFtpException
protected void speakerStartFile(OdetteFtpSession session, VirtualFile vf) throws OdetteFtpException
session
- exchange
-
OdetteFtpException
protected VirtualFile normalizeVirtualFile(OdetteFtpSession session, VirtualFile vf)
public void startFilePositiveAnswerReceived(OdetteFtpSession session, CommandExchangeBuffer sfpa) throws OdetteFtpException
startFilePositiveAnswerReceived
in interface ProtocolHandler
OdetteFtpException
public void startFileNegativeAnswerReceived(OdetteFtpSession session, CommandExchangeBuffer sfna) throws OdetteFtpException
startFileNegativeAnswerReceived
in interface ProtocolHandler
OdetteFtpException
protected void speakerSendData(OdetteFtpSession session) throws OdetteFtpException
session
-
OdetteFtpException
protected void speakerEndFile(OdetteFtpSession session, VirtualFile virtualFile) throws OdetteFtpException
OdetteFtpException
public void endFileNegativeAnswerReceived(OdetteFtpSession session, CommandExchangeBuffer efna) throws OdetteFtpException
endFileNegativeAnswerReceived
in interface ProtocolHandler
OdetteFtpException
public void endFilePositiveAnswerReceived(OdetteFtpSession session, CommandExchangeBuffer efpa) throws OdetteFtpException
endFilePositiveAnswerReceived
in interface ProtocolHandler
OdetteFtpException
public void readyMessageReceived(OdetteFtpSession session) throws OdetteFtpException
ProtocolHandler
Thus, the both negotiate session authentication and parameters exchanging the SSID command.
Protocol Sequence
1. Initiator <-------------SSRM -- Responder Ready Message 2. -- SSID ------------> Identification 3. <------------ SSID -- Identification
readyMessageReceived
in interface ProtocolHandler
OdetteFtpException
protected void speakerDeliveryNotification(OdetteFtpSession session, DeliveryNotification notif) throws OdetteFtpException
OdetteFtpException
public void endToEndResponseReceived(OdetteFtpSession session, CommandExchangeBuffer eerp) throws OdetteFtpException
endToEndResponseReceived
in interface ProtocolHandler
OdetteFtpException
public void protocolRelease(OdetteFtpSession session, EndSessionReason reason, String reasonText)
protocolRelease
in interface ProtocolHandler
public void endSessionReceived(OdetteFtpSession session, CommandExchangeBuffer esid) throws OdetteFtpException
endSessionReceived
in interface ProtocolHandler
OdetteFtpException
protected void initiatorStartSessionReceived(OdetteFtpSession session, CommandExchangeBuffer ssid) throws OdetteFtpException
OdetteFtpException
protected void checkSessionParamsViolation(int ssidsdeb, int ssidcred, TransferMode ssidsr, boolean ssidspec, OdetteFtpSession session) throws OdetteFtpException
OdetteFtpException
protected void responderSendStartSession(OdetteFtpSession session, CommandExchangeBuffer ssid) throws OdetteFtpException
OdetteFtpException
protected abstract CommandExchangeBuffer buildStartFileNegativeAnswerCommand(AnswerReason reason, String reasonText, boolean retryLater)
protected abstract CommandExchangeBuffer buildEndFileNegativeAnswerCommand(AnswerReason reason, String reasonText)
protected abstract CommandExchangeBuffer buildStartFilePositiveAnswerCommand(long answerCount)
protected abstract CommandExchangeBuffer buildStartFileCommand(OdetteFtpSession session, VirtualFile vf)
protected abstract CommandExchangeBuffer buildEndFilePositiveAnswerCommand(boolean changeDirection)
protected abstract CommandExchangeBuffer buildEndFileCommand(long recordCount, long unitCount)
protected abstract CommandExchangeBuffer buildStartSessionCommand(String code, String pswd, String userData, OdetteFtpSession session)
protected abstract CommandExchangeBuffer buildEndSessionCommand(EndSessionReason reason, String reasonText)
protected abstract CommandExchangeBuffer buildDeliveryNotificationCommand(DeliveryNotification notif)
protected abstract CommandExchangeBuffer buildReadyToReceiveCommand()
protected abstract DefaultVirtualFile buildVirtualFileObject(OdetteFtpSession session, CommandExchangeBuffer sfid) throws OdetteFtpException
OdetteFtpException
protected abstract DeliveryNotification buildEndToEndResponse(CommandExchangeBuffer eerp)
protected abstract DeliveryNotification buildNegativeEndResponse(CommandExchangeBuffer nerp) throws OdetteFtpException
OdetteFtpException
protected abstract AnswerReasonInfo buildAnswerReasonInfoObject(CommandExchangeBuffer sfna) throws OdetteFtpException
OdetteFtpException
protected abstract EndSessionReasonInfo buildEndSessionReasonInfoObject(CommandExchangeBuffer esid) throws OdetteFtpException
OdetteFtpException
protected void release(OdetteFtpSession session) throws OdetteFtpException
OdetteFtpException
protected abstract long protocolMaxFileSizeSupported()
protected void speakerChangeDirection(OdetteFtpSession session) throws OdetteFtpException
OdetteFtpException
protected void startSessionPasswordAuthentication(OdetteFtpSession session, CommandExchangeBuffer ssid, boolean mandatory) throws OdetteFtpException
OdetteFtpException
protected boolean handleCallback(OdetteFtpSession session, Callback callback)
protected void speakerTransmitRequests(OdetteFtpSession session) throws OdetteFtpException
OdetteFtpException
protected void speakerChangeDirectionPreventingLoop(OdetteFtpSession session) throws OdetteFtpException
session
-
OdetteFtpException
protected final void resetOutgoingCredits(OdetteFtpSession session)
protected final void resetIncomingCredits(OdetteFtpSession session)
protected final void consumeOutgoingCredits(OdetteFtpSession session)
protected final void consumeIncomingCredits(OdetteFtpSession session)
protected CommandExchangeBuffer buildSetCreditCommand()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |