⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 expirestask.java

📁 First of all, the Applet-phone is a SIP User-Agent with audio and text messaging capabilities. But
💻 JAVA
字号:
/******************************************************************************** Product of NIST/ITL Advanced Networking Technologies Division (ANTD)         ** Creator: O. Deruelle (deruelle@nist.gov)                                     ** Questions/Comments: nist-sip-dev@antd.nist.gov                               ********************************************************************************/package gov.nist.examples.busy.gateway.registrar;import java.util.*;import javax.sip.header.*;import javax.sip.address.*;/** Class for removing the bindings after expires */public class ExpiresTask extends TimerTask {        private String key;    private ContactHeader contactHeader;    private RegistrationsTable registrationsTable;        /** Constructor       */       public ExpiresTask(String key,ContactHeader contactHeader,RegistrationsTable registrationsTable) {        this.registrationsTable=registrationsTable;        this.key=key;        this.contactHeader=contactHeader;    }       public void  run() {        Address address=contactHeader.getAddress();        javax.sip.address.URI cleanedUri=Registrar.getCleanUri(address.getURI() );        String contactURI=cleanedUri.toString();        registrationsTable.removeContact(key,contactHeader);        registrationsTable.expiresTaskTable.remove(contactURI);        System.out.println("ExpiresTask, run(), we  removed the contact: "+contactURI+        " for the user: "+key);        }    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -