2
1
Ответвление 0
Projet_POO/Projet_POO/src/clavardage/SessionClavardage.java
benassai 031da499e1 Petits ajustements
Remplacement des \n par System.lineseparator et utilisation de
stringbuilder pour la récupération de l'historique.
2021-02-15 10:02:51 +01:00

44 строки
1 КиБ
Java

package clavardage;
import java.beans.PropertyChangeListener;
import java.io.IOException;
import java.util.ArrayList;
import data.Message;
public abstract class SessionClavardage {
private String idSource = null;
private String idDestination = null;
private boolean remote = false;
public SessionClavardage(String idSource, String idDestination) {
this.idSource = idSource;
this.idDestination = idDestination;
}
public abstract ArrayList <Message> getNewMessages ();
public abstract void sendObject(Message message) throws IOException;
public abstract void stop();
public abstract void addPropertyChangeListener(PropertyChangeListener p);
public abstract void removePropertyChangeListener(PropertyChangeListener p);
public String toString() {
return "Session entre " + "this.idSource" + " et " + this.idDestination + System.lineSeparator();
}
public String getIdSource() {
return this.idSource;
}
public String getIdDestination() {
return this.idDestination;
}
public boolean isRemote() {
return this.remote;
}
}