public static ServerPart getInstance() { if (instance == null) { instance = new ServerPart(); } return(instance); }
public void initComponents() { //instances serverPart = ServerPart.getInstance(); clientPart = ClientPart.getInstance(); socketStore = SocketStore.getInstance(); reciever = new Reciever(); sender = Sender.getInstance(); encoder = Encoder.getInstance(); controlHandler = ControlHandler.getInstance(); fileShareController = new FileShareMiddleController(); //events registering registerEvnts(); //starting //serverPart.startServer(); }