Liferay 7.0-ce-b4

com.liferay.portal.fabric.netty.fileserver.handlers
Class FileUploadChannelHandler

java.lang.Object
  extended by io.netty.channel.ChannelHandlerAdapter
      extended by io.netty.channel.ChannelInboundHandlerAdapter
          extended by com.liferay.portal.fabric.netty.fileserver.handlers.FileUploadChannelHandler
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

public class FileUploadChannelHandler
extends io.netty.channel.ChannelInboundHandlerAdapter


Nested Class Summary
 
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
 
Field Summary
protected  AsyncBroker<java.nio.file.Path,FileResponse> asyncBroker
           
protected  io.netty.util.concurrent.EventExecutor eventExecutor
           
protected  FileChannel fileChannel
           
protected  FileResponse fileResponse
           
protected  java.nio.file.Path tempFilePath
           
 
Constructor Summary
FileUploadChannelHandler(AsyncBroker<java.nio.file.Path,FileResponse> asyncBroker, FileResponse fileResponse, io.netty.util.concurrent.EventExecutor eventExecutor)
           
 
Method Summary
 void channelRead(io.netty.channel.ChannelHandlerContext channelHandlerContext, Object object)
           
 void exceptionCaught(io.netty.channel.ChannelHandlerContext channelHandlerContext, Throwable throwable)
           
protected  void finish()
           
protected  boolean receive(io.netty.buffer.ByteBuf byteBuf)
           
 
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
 
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
handlerAdded, handlerRemoved, isSharable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
 

Field Detail

asyncBroker

protected final AsyncBroker<java.nio.file.Path,FileResponse> asyncBroker

eventExecutor

protected final io.netty.util.concurrent.EventExecutor eventExecutor

fileChannel

protected final FileChannel fileChannel

fileResponse

protected final FileResponse fileResponse

tempFilePath

protected final java.nio.file.Path tempFilePath
Constructor Detail

FileUploadChannelHandler

public FileUploadChannelHandler(AsyncBroker<java.nio.file.Path,FileResponse> asyncBroker,
                                FileResponse fileResponse,
                                io.netty.util.concurrent.EventExecutor eventExecutor)
                         throws IOException
Throws:
IOException
Method Detail

channelRead

public void channelRead(io.netty.channel.ChannelHandlerContext channelHandlerContext,
                        Object object)
                 throws IOException
Specified by:
channelRead in interface io.netty.channel.ChannelInboundHandler
Overrides:
channelRead in class io.netty.channel.ChannelInboundHandlerAdapter
Throws:
IOException

exceptionCaught

public void exceptionCaught(io.netty.channel.ChannelHandlerContext channelHandlerContext,
                            Throwable throwable)
                     throws IOException
Specified by:
exceptionCaught in interface io.netty.channel.ChannelHandler
Specified by:
exceptionCaught in interface io.netty.channel.ChannelInboundHandler
Overrides:
exceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapter
Throws:
IOException

finish

protected void finish()
               throws IOException
Throws:
IOException

receive

protected boolean receive(io.netty.buffer.ByteBuf byteBuf)
                   throws IOException
Throws:
IOException

Liferay 7.0-ce-b4