Subversion Repositories eFlore/Applications.coel

Rev

Rev 1367 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1320 gduche 1
package org.tela_botanica.client.synchronisation;
2
 
3
import org.tela_botanica.client.interfaces.Rafraichissable;
4
import org.tela_botanica.client.synchronisation.Reponse;
5
 
6
public class Requete implements Rafraichissable{
7
 
8
	private Rafraichissable vueARafraichir;
1367 cyprien 9
	private Reponse reponse;
1320 gduche 10
	private int numeroSequence;
11
 
12
	public Requete(Rafraichissable vueARafraichir, int numeroSequence)	{
13
		this.vueARafraichir = vueARafraichir;
14
		this.numeroSequence = numeroSequence;
15
	}
16
 
17
	public Rafraichissable getVueARafraichir()	{
18
		return this.vueARafraichir;
19
	}
20
 
1367 cyprien 21
	public boolean hasResponse()	{
22
		return (reponse!=null);
1320 gduche 23
	}
24
 
25
	public void setRetour(Reponse reponse)	{
1367 cyprien 26
		this.reponse = reponse;
1320 gduche 27
	}
28
 
1367 cyprien 29
	public Reponse obtenirReponse()	{
30
		return this.reponse;
1320 gduche 31
	}
32
 
33
	public int obtenirNumeroSequence()	{
34
		return numeroSequence;
35
	}
36
 
37
	public void rafraichir()	{
1367 cyprien 38
		vueARafraichir.rafraichir(reponse.obtenirRetour());
1320 gduche 39
	}
40
 
41
	public void rafraichir(Object nouvellesDonnees) {
1367 cyprien 42
		vueARafraichir.rafraichir(nouvellesDonnees);
1320 gduche 43
	}
44
 
45
	public String toString()	{
46
		return vueARafraichir.getClass().getName() +"= " +numeroSequence;
47
	}
48
}