You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CommandAnnehmen.java 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package controller.commands;
  7. import controller.CommandInterface;
  8. import gui.Hauptfenster;
  9. import java.util.logging.Logger;
  10. import logger.OhmLogger;
  11. import model.SIPmodel;
  12. /**
  13. *
  14. * @author Jan
  15. * Anruf annehmen -> Event muss noch gelöscht werden falls nichtmehr angerufen wird,
  16. * welches Kriterium oder Bedingung könnte es geben.
  17. * -> evtl. über "Undo" aktion
  18. */
  19. public class CommandAnnehmen implements CommandInterface
  20. {
  21. private static final Logger lginvite = OhmLogger.getLogger();
  22. private SIPmodel model;
  23. private Hauptfenster view;
  24. //private InputStream istream;
  25. //Socket s;
  26. public CommandAnnehmen(SIPmodel model, Hauptfenster view)
  27. {
  28. this.model = model;
  29. this.view = view;
  30. }
  31. @Override
  32. public void execute()
  33. {
  34. {
  35. model.annehmen();
  36. try
  37. {
  38. //s = new Socket(model.getMyIPAdress(),model.getMyPort());
  39. view.getTxtArea().append("Socket geöffnet");
  40. //istream = s.getInputStream();
  41. //System.out.println(istream);
  42. }
  43. catch(Exception ex)
  44. {
  45. }
  46. }
  47. }
  48. @Override
  49. public void undo()
  50. {
  51. }
  52. @Override
  53. public Boolean isundoable()
  54. {
  55. return false;
  56. }
  57. }