title: Periodic check if status from file change RCP
body: <p>What is concept of method which will periodic check book status from XML file and if status changed it will alert, with RCP ? I want to create task which will do this.
  Main class I have in JFrame.</p>
  
  <p>Here is XmlFile and POJO.</p>
  
  <pre><code> package net.kxyz;
  
   import java.io.File;
   import java.io.FileWriter;
   import java.io.IOException;
   import java.util.ArrayList;
   import java.util.logging.Level;
   import java.util.logging.Logger;
   import javax.xml.parsers.DocumentBuilder;
   import javax.xml.parsers.DocumentBuilderFactory;
   import javax.xml.parsers.ParserConfigurationException;
   import javax.xml.transform.Transformer;
   import javax.xml.transform.TransformerConfigurationException;
   import javax.xml.transform.TransformerException;
   import javax.xml.transform.TransformerFactory;
   import javax.xml.transform.dom.DOMSource;
   import javax.xml.transform.stream.StreamResult;
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
   import org.w3c.dom.Node;
   import org.w3c.dom.NodeList;
   import org.xml.sax.SAXException;
   import xyz.libary.Book;
   import xyz.libary.DataInterface;
  
   /**
    *
    * @author kuman
    */
   public class XmlDataInterfaceImpl implements DataInterface {
  
  File fXmlFile = new File("baza.xml");
  ArrayList&lt;Book&gt; book = new ArrayList&lt;&gt;();
  
  @Override
  public void updateBook(Book book2) {
  
      int index = book2.getId();
      this.book.get(index).setTitle(book2.getTitle());
      this.book.get(index).setAuthor(book2.getAuthor());
      this.book.get(index).setYear(book2.getYear());
      this.book.get(index).setState(book2.isState());
  
  }
  
  @Override
  public ArrayList&lt;Book&gt; getAllBooks() {
      //code
      return book;
  }
  
  public void addBook(Book book2) {
      //code
  }
  
  @Override
  public void deleteBook(Book book) {
      //code
  }
  
  private void toFile() {
  
      //code
  
  }
  
   }
  </code></pre>
  
  <p>POJO</p>
  
  <pre><code> /*
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    */
   package xyz.libary;
  
   /**
    *
    * @author kuman
    */
   public class Book {
  int id;
  String title;
  String author;
  int year;
  Boolean state;
  
  public Book() {};
  public Book(int id, String title, String author, int year) {
      this.id = id ;
      this.title = title;
      this.author = author;
      this.year = year;
      this.state = true;
  }
  
  public int getId() {
      return id;
  }
  
  public void setId(int id) {
      this.id = id;
  }
  
  
  public String getAuthor() {
      return author;
  }
  
  public void setAuthor(String author) {
      this.author = author;
  }
  
  public Boolean isState() {
      return state;
  }
  
  public void setState(Boolean state) {
      this.state = state;
  }
  
  public String getTitle() {
      return title;
  }
  
  public void setTitle(String title) {
      this.title = title;
  }
  
  public int getYear() {
      return year;
  }
  
  public void setYear(int year) {
      this.year = year;
  }
  
  public void setState(Object value) {
      this.state=(Boolean)(value);
  }
  
  
  
  }
  </code></pre>