📄 callmanager.java
字号:
/* * CallManager.java * * Created on May 7, 2003, 9:35 AM */package gov.nist.examples.pcc;import java.util.*;/** * * @author deruelle */public class CallManager { protected Vector callAssociationList; protected CallListener callListener; /** Creates a new instance of CallManager */ public CallManager(CallListener callListener) { callAssociationList=new Vector(); this.callListener=callListener; } public CallAssociation getCallAssociation(String callId) { for (int i=0;i<callAssociationList.size();i++) { CallAssociation callAssociation=(CallAssociation)callAssociationList.elementAt(i); if (callAssociation.getCallId().equals(callId) ) { return callAssociation; } } return null; } public void initCalls(Agent firstAgent, Agent secondAgent) { CallLauncherDebug.println("First agent: "+firstAgent.userName+"@"+firstAgent.hostName); CallLauncherDebug.println("Second agent: "+secondAgent.userName+"@"+secondAgent.hostName); Call firstCall=new Call(callListener,secondAgent,firstAgent); CallLauncherDebug.println("Let's send an INVITE to the first agent (the callee)."); Call secondCall=new Call(callListener,firstAgent,secondAgent); CallAssociation callAssociation=new CallAssociation(firstCall,secondCall); callAssociationList.addElement(callAssociation); try{ // CallId, sdp firstCall.sendInvite(null,null); } catch(Exception e) { e.printStackTrace(); } } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -