@Override
    public void run() {
        try {
            connection = true;
            while(connection) {
                reading();
                parsing(xmlMessage);
            }
        } catch (Exception exc) {
            DataOutputStream out = null;
            try {
                log.error("Exception", exc);
                out = new DataOutputStream(socket.getOutputStream());
                exceptionHandling(exc);
                out.writeUTF(resultMessage());
            } catch (IOException e) {
                log.error("Exception", e);
            } finally {
                if (!(out == null)) {
                    try {
                        out.flush();
                    } catch (IOException e) {
                        log.error("Exception", e);
                    }
                }
            }
        }
    }