Subversion Repositories eFlore/Applications.coel

Rev

Rev 1367 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package org.tela_botanica.client.synchronisation;

import org.tela_botanica.client.interfaces.Rafraichissable;
import org.tela_botanica.client.synchronisation.Reponse;

public class Requete implements Rafraichissable{
        
        private Rafraichissable vueARafraichir;
        private Object retour;
        private int numeroSequence;
        
        public Requete(Rafraichissable vueARafraichir, int numeroSequence)      {
                this.vueARafraichir = vueARafraichir;
                this.numeroSequence = numeroSequence;
        }
        
        public Rafraichissable getVueARafraichir()      {
                return this.vueARafraichir;
        }
        
        public boolean aRetour()        {
                return (retour!=null);
        }
        
        public void setRetour(Reponse reponse)  {
                this.retour = reponse.obtenirRetour();
        }
        
        public Object obtenirRetour()   {
                return this.retour;
        }
        
        public int obtenirNumeroSequence()      {
                return numeroSequence;
        }
        
        public void rafraichir()        {
                rafraichir(null);
        }
        
        public void rafraichir(Object nouvellesDonnees) {
                vueARafraichir.rafraichir(retour);
        }
        
        public String toString()        {
                return vueARafraichir.getClass().getName() +"= " +numeroSequence;
        }
}