goldengate.ftp.core.data.handler
Class FtpDataStructureCodec

java.lang.Object
  extended by org.jboss.netty.channel.SimpleChannelHandler
      extended by goldengate.ftp.core.data.handler.FtpDataStructureCodec
All Implemented Interfaces:
org.jboss.netty.channel.ChannelDownstreamHandler, org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler

@ChannelHandler.Sharable
public class FtpDataStructureCodec
extends org.jboss.netty.channel.SimpleChannelHandler

Third CODEC :
- encode/decode : takes DataBlock and transforms it to a DataBlock
FILE and RECORD are implemented (DataNetworkHandler will do the real job). PAGE is not implemented.
Note that real actions are taken in the DataNetworkHandler according to the implementation of FtpFile.

Author:
Frederic Bregier

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable
 
Constructor Summary
FtpDataStructureCodec(FtpArgumentCode.TransferStructure structure)
           
 
Method Summary
 FtpArgumentCode.TransferStructure getStructure()
           
 void messageReceived(org.jboss.netty.channel.ChannelHandlerContext arg0, org.jboss.netty.channel.MessageEvent arg1)
           
 void setStructure(FtpArgumentCode.TransferStructure structure)
           
 void writeRequested(org.jboss.netty.channel.ChannelHandlerContext arg0, org.jboss.netty.channel.MessageEvent arg1)
           
 
Methods inherited from class org.jboss.netty.channel.SimpleChannelHandler
bindRequested, channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, closeRequested, connectRequested, disconnectRequested, exceptionCaught, handleDownstream, handleUpstream, setInterestOpsRequested, unbindRequested, writeComplete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FtpDataStructureCodec

public FtpDataStructureCodec(FtpArgumentCode.TransferStructure structure)
Parameters:
structure -
Method Detail

getStructure

public FtpArgumentCode.TransferStructure getStructure()
Returns:
the structure

setStructure

public void setStructure(FtpArgumentCode.TransferStructure structure)
Parameters:
structure - the structure to set

writeRequested

public void writeRequested(org.jboss.netty.channel.ChannelHandlerContext arg0,
                           org.jboss.netty.channel.MessageEvent arg1)
                    throws Exception
Overrides:
writeRequested in class org.jboss.netty.channel.SimpleChannelHandler
Throws:
Exception

messageReceived

public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext arg0,
                            org.jboss.netty.channel.MessageEvent arg1)
                     throws Exception
Overrides:
messageReceived in class org.jboss.netty.channel.SimpleChannelHandler
Throws:
Exception


Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.