Package ch.autumo.beetroot.server
Class FileServer
java.lang.Object
ch.autumo.beetroot.server.FileServer
File server.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.slf4j.Loggerprotected intprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToDownloadQueue(Download download) Queue download for client that requested a file.voidaddToUploadQueue(Upload upload) Queue upload for client that requested to receive a file server-sideprocessServerCommand(ServerCommand command) This method is called when a server command has been received.voidstart()Start file server.voidstop()Stop file server.
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG -
portFileServer
protected int portFileServer -
portFileReceiver
protected int portFileReceiver
-
-
Constructor Details
-
FileServer
The file server.- Parameters:
baseServer- base serverfileStorage- file storage
-
-
Method Details
-
start
public void start()Start file server. -
stop
public void stop()Stop file server. -
addToDownloadQueue
Queue download for client that requested a file.- Parameters:
download- download
-
addToUploadQueue
Queue upload for client that requested to receive a file server-side- Parameters:
upload- upload
-
processServerCommand
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
-