public class UpgradeServer
extends java.lang.Object
implements java.lang.Runnable
UpgradeServer is responsible for handling upgrade requests from VBS clients. | Modifier and Type | Field and Description |
|---|---|
private static org.apache.log4j.Logger |
log
Used to log different events.
|
private java.net.ServerSocket |
myServerSocket
Socket used by the server to listen to requests from clients.
|
private java.net.Socket |
mySocket
Socket used to communicate with a client.
|
private java.io.File |
myUpgradeFolder
Folder containing the upgrade file.
|
private boolean |
runFlag
The thread will stop when this flag is
false. |
private java.lang.Thread |
upgradeServerThread
Thread used by the class.
|
| Constructor and Description |
|---|
UpgradeServer(int port,
java.lang.String myUpgradeFolderPath)
Constructs the class.
|
private static org.apache.log4j.Logger log
private java.lang.Thread upgradeServerThread
private java.net.ServerSocket myServerSocket
private java.net.Socket mySocket
private java.io.File myUpgradeFolder
private boolean runFlag
false.public UpgradeServer(int port,
java.lang.String myUpgradeFolderPath)
throws java.io.IOException
port - the port on which the server listens to requests from clientsmyUpgradeFolderPath - path to the folder containing the upgrade filejava.io.IOException - if a communication problem occurspublic void start()
public void stop()
public boolean isAlive()
UpgradeServer is alive.public void run()
UpgradeTransmitter.run in interface java.lang.Runnable