IMCall.java
Upload User: liulanlin
Upload Date: 2017-12-08
Package Size: 1274k
Code Size: 2k
Category:

VOIP program

Development Platform:

Java

  1. /*
  2.  * IMCall.java
  3.  * 
  4.  * Created on Mar 15, 2004
  5.  *
  6.  */
  7. package gov.nist.applet.phone.ua.call;
  8. import javax.sip.Dialog;
  9. /**
  10.  * This class will keep information about an instant messaging or a voice 
  11.  * messaging call
  12.  * 
  13.  * @author Jean Deruelle <jean.deruelle@nist.gov>
  14.  *
  15.  * <a href="{@docRoot}/uncopyright.html">This code is in the public domain.</a>
  16.  */
  17. public class IMCall implements Call{
  18. private String callee=null;
  19. private Dialog dialog=null;
  20. private String callStatus=null;
  21. /**
  22.  * Constructs a new IMCall
  23.  */
  24. public IMCall(String callee) {
  25.                 System.out.println("creating IM Call " + callee);
  26. setCallee(callee);
  27. }
  28. /**
  29.  * Retrieve the current status of the call
  30.  * @return the current status of the call
  31.  */
  32. public String getStatus(){
  33. return this.callStatus;
  34. }
  35. /**
  36.  * Set the current status of the call
  37.  * @param callStatus - the current status of the call
  38.  */
  39. public void setStatus(String callStatus){
  40. this.callStatus=callStatus;
  41. }
  42. /**
  43.  * Retrieve the dialog of the call
  44.  * @return the dialog of the call
  45.  */
  46. public Dialog getDialog(){
  47. return this.dialog;
  48. }
  49. /**
  50.  * Set the dialog of the call
  51.  * @param dialog - the dialog of the call
  52.  */
  53. public void setDialog(Dialog dialog){
  54. this.dialog=dialog;
  55. }
  56. /**
  57.  * Retrieve the callee of this call
  58.  * @return the callee of this call
  59.  */
  60. public String getCallee(){
  61. return this.callee;
  62. }
  63. /**
  64.  * Set the callee of this call
  65.  * @param callee - the callee of this call
  66.  */
  67. public void setCallee(String callee){
  68. this.callee=callee;
  69. this.callee=this.callee.replace('<',' ');
  70. this.callee=this.callee.replace('>',' ');
  71. this.callee=this.callee.trim();
  72. //this.callee=this.callee.substring("sip:".length(),this.callee.length());
  73. }
  74. }