package network;
import common.info.Server;
import static main.Config.server;
import static main.ServerMain.getConnectionManager;
import static main.ServerMain.getFileManager;
public final class NetworkManager
{
private Server thisServer;
public NetworkManager()
{
thisServer = new Server(server.name, server.description, server.address,
server.standardPort, server.securedPort);
}
public Server getThisServer()
{
thisServer.name = server.name;
thisServer.description = server.description;
thisServer.host = server.address;
thisServer.standardPort = server.standardPort;
thisServer.securedPort = server.securedPort;
thisServer.ping = 0;
thisServer.users = getConnectionManager().getNumberOfConnections();
thisServer.files = getFileManager().getNumberOfFiles();
return thisServer;
}
}