Package network

Source Code of network.NetworkManager

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;
  }

}
TOP

Related Classes of network.NetworkManager

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.