Class FileServer

java.lang.Object
ch.autumo.beetroot.server.FileServer

public class FileServer extends Object
File server.
  • Field Details

    • LOG

      protected static final org.slf4j.Logger LOG
    • portFileServer

      protected int portFileServer
    • portFileReceiver

      protected int portFileReceiver
  • Constructor Details

    • FileServer

      public FileServer(BaseServer baseServer, FileStorage fileStorage)
      The file server.
      Parameters:
      baseServer - base server
      fileStorage - file storage
  • Method Details

    • start

      public void start()
      Start file server.
    • stop

      public void stop()
      Stop file server.
    • addToDownloadQueue

      public void addToDownloadQueue(Download download)
      Queue download for client that requested a file.
      Parameters:
      download - download
    • addToUploadQueue

      public void addToUploadQueue(Upload upload)
      Queue upload for client that requested to receive a file server-side
      Parameters:
      upload - upload
    • processServerCommand

      public Download processServerCommand(ServerCommand command)
      This method is called when a server command has been received. At this point security checks have been made.
      Parameters:
      command - received server command
      Returns:
      download or null