org.neociclo.odetteftp.oftplet
Class OftpletAdapter

java.lang.Object
  extended by org.neociclo.odetteftp.oftplet.OftpletAdapter
All Implemented Interfaces:
Oftplet
Direct Known Subclasses:
InOutSharedQueueOftplet

public abstract class OftpletAdapter
extends Object
implements Oftplet

Version:
$Rev: 587 $ $Date: 2010-08-12 18:17:42 -0300 (Thu, 12 Aug 2010) $
Author:
Rafael Marins

Constructor Summary
OftpletAdapter()
           
 
Method Summary
 void destroy()
          Called by the Oftplet container to indicate it is being taken out of service.
 OftpletListener getListener()
           
 SecurityContext getSecurityContext()
           
 OftpletSpeaker getSpeaker()
           
 void init(OdetteFtpSession session)
          Called by the Oftplet container to indicate that it is placed into service.
 boolean isProtocolVersionSupported(OdetteFtpVersion version)
           
 void onExceptionCaught(Throwable cause)
          Callback method called on event of an unexpected exception during the communication session and while performing file transfer.
 void onSessionEnd()
          Callback method indicating protocol release of End Session (ESID) command - normal or abnormal protocol termination.
 void onSessionStart()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OftpletAdapter

public OftpletAdapter()
Method Detail

destroy

public void destroy()
Description copied from interface: Oftplet
Called by the Oftplet container to indicate it is being taken out of service.

Specified by:
destroy in interface Oftplet

getListener

public OftpletListener getListener()
Specified by:
getListener in interface Oftplet

getSecurityContext

public SecurityContext getSecurityContext()
Specified by:
getSecurityContext in interface Oftplet

getSpeaker

public OftpletSpeaker getSpeaker()
Specified by:
getSpeaker in interface Oftplet

init

public void init(OdetteFtpSession session)
          throws OdetteFtpException
Description copied from interface: Oftplet
Called by the Oftplet container to indicate that it is placed into service.

The implementation of this method might set up the given session in the context with parameters configuration for the initial handshaking (SSID).

Specified by:
init in interface Oftplet
Throws:
OdetteFtpException

onExceptionCaught

public void onExceptionCaught(Throwable cause)
Description copied from interface: Oftplet
Callback method called on event of an unexpected exception during the communication session and while performing file transfer. The Oftplet might check the current ODETTE-FTP entity state and if in the circumstance of file transfer when handling the exceptions thrown.

Specified by:
onExceptionCaught in interface Oftplet

onSessionStart

public void onSessionStart()
Specified by:
onSessionStart in interface Oftplet

onSessionEnd

public void onSessionEnd()
Description copied from interface: Oftplet
Callback method indicating protocol release of End Session (ESID) command - normal or abnormal protocol termination.

There ISN'T a corresponding onSessionStart() method but the Oftplet#init(OdetteFtpContext) method can be used with similar way, since it's invoked when the protocol session is just created.

Specified by:
onSessionEnd in interface Oftplet

isProtocolVersionSupported

public boolean isProtocolVersionSupported(OdetteFtpVersion version)
Specified by:
isProtocolVersionSupported in interface Oftplet
Returns:


ACCORD