123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
-
- package controller.commands;
-
- import controller.CommandInterface;
- import gui.Hauptfenster;
- import java.text.ParseException;
- import java.util.logging.Level;
- import java.util.logging.Logger;
- import javax.sdp.SdpException;
- import javax.sip.InvalidArgumentException;
- import javax.sip.SipException;
- import logger.OhmLogger;
- import model.VoIP;
-
- /**
- *
- * @author Normal
- */
- public class CommandInvite implements CommandInterface
- {
- private static final Logger lginvite = OhmLogger.getLogger();
- private VoIP model;
- private Hauptfenster view;
- public CommandInvite(VoIP model, Hauptfenster view)
- {
- this.model = model;
- this.view = view;
- }
-
- @Override
- public void execute()
- {
- try
- {
- view.getTxtArea().append("Einladung an " + view.getTxtcallIP().getText() + " gesendet\n");
- model.sendInvitation(view.getTxtcallIP().getText(),view.getTxtServerIP().getText(), 5078);
- }
- catch (ParseException|InvalidArgumentException|SdpException|SipException ex)
- {
- view.getTxtArea().append("Einladung fehlgeschlagen\n");
- lginvite.getLogger(CommandInvite.class.getName()).log(Level.SEVERE, null, ex);
- }
- }
- @Override
- public void undo()
- {
-
- }
-
- @Override
- public Boolean isundoable()
- {
- return false;
- }
- }
|