Browse Source

Funktioniert und aufgeräumt

Jens
Jens Schuhmann 1 year ago
parent
commit
68eb43c715
2 changed files with 3 additions and 11 deletions
  1. 1
    9
      src/ChatProgramm/model/Transmitter.java
  2. 2
    2
      src/config.properties

+ 1
- 9
src/ChatProgramm/model/Transmitter.java View File

@@ -43,8 +43,6 @@ public abstract class Transmitter implements Runnable, Subscriber<Figur>, Transm
protected ObjectOutputStream writer;
private Figur figur;
private String txtNachricht;
private boolean laufend;
private SubmissionPublisher<Figur> figurPublisher;
private ExecutorService eService;
private String receivedString;
@@ -135,15 +133,10 @@ public abstract class Transmitter implements Runnable, Subscriber<Figur>, Transm
public void run() {
while (true) {
lg.info("Warte auf Nachricht");
if(laufend) {
figur = receive();
figur = receive();
if(!figur.getPunkte().isEmpty()){
figurPublisher.submit(figur);
}
}
else{
break;
}
}
}

@@ -171,7 +164,6 @@ public abstract class Transmitter implements Runnable, Subscriber<Figur>, Transm
private void startempfangen()
{
synchronized (this){
laufend = true;
}
if (eService == null){
eService = Executors.newSingleThreadExecutor();

+ 2
- 2
src/config.properties View File

@@ -1,7 +1,7 @@
log.level=INFO

log.directory=../Aufgabe7_bandit
log.filename=ohmLog
# log.directory=../Aufgabe7_bandit
# log.filename=ohmLog

# Beispiel f\u00fcr verschiedene Level f\u00fcr unterschiedliche Pakete
# log.level.bandit.Zahlengenerator=FINE

Loading…
Cancel
Save