
public class DataNetworkHandler
extends io.netty.channel.SimpleChannelInboundHandler<org.waarp.common.file.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,
org.waarp.common.file.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 FtpSession getFtpSession()
public 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 void setSession(io.netty.channel.Channel channel)
public void channelActive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelActive in interface io.netty.channel.ChannelInboundHandlerchannelActive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void setCorrectCodec()
public void unlockModeCodec()
FtpTransferControlpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
throws Exception
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void setFtpTransfer(FtpTransfer ftpTransfer)
public void channelRead0(io.netty.channel.ChannelHandlerContext ctx,
org.waarp.common.file.DataBlock dataBlock)
channelRead0 in class io.netty.channel.SimpleChannelInboundHandler<org.waarp.common.file.DataBlock>public boolean writeMessage(String message)
message - Copyright © 2009–2019 Waarp. All rights reserved.