1 package com.quikj.application.web.talk.plugin; 2 3 import com.quikj.server.web.*; 4 5 import java.util.*; 6 7 public class SessionInfo 8 { 9 public SessionInfo(long session, EndPointInterface calling) 10 { 11 sessionId = session; 12 endPoints.addElement(calling); 13 } 14 15 public void addEndPoint(EndPointInterface endpoint) 16 { 17 endPoints.addElement(endpoint); 18 } 19 20 public boolean removeEndPoint(EndPointInterface endpoint) 21 { 22 int index = indexOf(endpoint); 23 24 if (index >= 0) 25 { 26 endPoints.removeElementAt(index); 27 } 28 else 29 { 30 return false; 31 } 32 return true; 33 } 34 35 public boolean replaceEndPoint (int index, EndPointInterface endpoint) 36 { 37 if (index < numEndPoints()) 38 { 39 endPoints.set(index, endpoint); 40 } 41 else 42 { 43 return false; 44 } 45 return true; 46 } 47 48 public long getSessionId() 49 { 50 return sessionId; 51 } 52 53 public int numEndPoints() 54 { 55 return endPoints.size(); 56 } 57 58 public EndPointInterface getCallingEndPoint() 59 { 60 return elementAt(0); 62 } 63 64 public EndPointInterface elementAt(int index) 65 { 66 return (EndPointInterface)endPoints.elementAt(index); 67 } 68 69 public int indexOf(EndPointInterface endpoint) { 71 return endPoints.indexOf(endpoint); 72 } 73 74 public void setConnected(boolean connected) 75 { 76 this.connected = connected; 77 } 78 79 public boolean isConnected() 80 { 81 return connected; 82 } 83 84 public void setRequestId(int request_id) 85 { 86 requestId = request_id; 87 } 88 89 public int getRequestId() 90 { 91 return requestId; 92 } 93 94 public ConferenceBridge getConferenceBridge() 95 { 96 return conferenceBridge; 97 } 98 99 public void setConferenceBridge (ConferenceBridge bridge) 100 { 101 conferenceBridge = bridge; 102 } 103 104 public void setSessionId (long new_session_id) 105 { 106 sessionId = new_session_id; 107 } 108 109 112 public java.lang.String getBillingId() 113 { 114 return billingId; 115 } 116 117 120 public void setBillingId(java.lang.String billingId) 121 { 122 this.billingId = billingId; 123 } 124 125 128 public java.lang.String getEncryptedKey() 129 { 130 return encryptedKey; 131 } 132 133 136 public void setEncryptedKey(java.lang.String encryptedKey) 137 { 138 this.encryptedKey = encryptedKey; 139 } 140 141 private long sessionId; 142 private Vector endPoints = new Vector(); 143 private boolean connected = false; 144 private int requestId = -1; 145 private ConferenceBridge conferenceBridge = null; 146 private String billingId = null; 147 private String encryptedKey = null; 148 } 149 150 151 152 153 154 155 156 157 | Popular Tags |