Class ReqFileHandler

java.lang.Object
com.cloud.serverpak.handlers.ReqFileHandler

public class ReqFileHandler extends Object
File request message listener class. Defines a method for work with a message containing the file data.
  • Field Details

  • Constructor Details

    • ReqFileHandler

      public ReqFileHandler(MainHandler mainHandler)
      The constructor saves a link to the main message listener. * @see FilesInformService
      Parameters:
      mainHandler - Netty's main listener.
      See Also:
  • Method Details

    • reqFileHandle

      public void reqFileHandle(io.netty.channel.ChannelHandlerContext ctx, Object msg)
      Processes a request from the client to receive a file if the file weighs more than 10 mb, cuts it into 10 mb pieces. and sends it to the client.
      Parameters:
      ctx - channel context.
      msg - the message object.