public static ClientPart getInstance() { if (instance == null) { instance = new ClientPart(); } 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(); }