
public class DataNetworkHandler extends io.netty.channel.SimpleChannelInboundHandler<DataBlock>
| Modifier and Type | Field and Description |
|---|---|
protected FtpConfiguration |
configuration
Configuration
|
protected FtpSession |
session
Internal store for the SessionInterface
|
| Constructor and Description |
|---|
DataNetworkHandler(FtpConfiguration configuration,
DataBusinessHandler handler,
boolean active)
Constructor from DataBusinessHandler
|
| Modifier and Type | Method and Description |
|---|---|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx)
Initialize the Handler.
|
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx)
Run firstly executeChannelClosed.
|
void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
DataBlock dataBlock)
Act as needed according to the receive DataBlock message
|
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
Default exception task: close the current connection after calling
exceptionLocalCaught.
|
DataBusinessHandler |
getDataBusinessHandler() |
FtpSession |
getFtpSession() |
NetworkHandler |
getNetworkHandler() |
void |
setCorrectCodec()
Set the CODEC according to the mode.
|
void |
setFtpTransfer(FtpTransfer ftpTransfer) |
protected void |
setSession(io.netty.channel.Channel channel) |
void |
unlockModeCodec()
Unlock the Mode Codec from openConnection of
FtpTransferControl |
boolean |
writeMessage(String message)
Write a simple message (like LIST) and wait for it
|
acceptInboundMessage, channelReadchannelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharableprotected final FtpConfiguration configuration
protected FtpSession session
public DataNetworkHandler(FtpConfiguration configuration, DataBusinessHandler handler, boolean active)
configuration - handler - active - public DataBusinessHandler getDataBusinessHandler() throws FtpNoConnectionException
FtpNoConnectionExceptionpublic final FtpSession getFtpSession()
public final NetworkHandler getNetworkHandler()
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionprotected final void setSession(io.netty.channel.Channel channel)
public void channelActive(io.netty.channel.ChannelHandlerContext ctx)
channelActive in interface io.netty.channel.ChannelInboundHandlerchannelActive in class io.netty.channel.ChannelInboundHandlerAdapterpublic final void setCorrectCodec()
throws FtpNoConnectionException
FtpNoConnectionExceptionpublic final void unlockModeCodec()
FtpTransferControlpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterpublic final void setFtpTransfer(FtpTransfer ftpTransfer)
public void channelRead0(io.netty.channel.ChannelHandlerContext ctx,
DataBlock dataBlock)
channelRead0 in class io.netty.channel.SimpleChannelInboundHandler<DataBlock>public final boolean writeMessage(String message)
message - Copyright © 2009–2022 Waarp. All rights reserved.