当前位置: 首页>>代码示例>>Java>>正文


Java RequestEvent.getDialog方法代码示例

本文整理汇总了Java中javax.sip.RequestEvent.getDialog方法的典型用法代码示例。如果您正苦于以下问题:Java RequestEvent.getDialog方法的具体用法?Java RequestEvent.getDialog怎么用?Java RequestEvent.getDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.sip.RequestEvent的用法示例。


在下文中一共展示了RequestEvent.getDialog方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: processBye

import javax.sip.RequestEvent; //导入方法依赖的package包/类
/**
 * Process the bye request.
 */
public void processBye(RequestEvent requestEvent,
        ServerTransaction serverTransactionId) {
    final Request request = requestEvent.getRequest();
    final Dialog dialog = requestEvent.getDialog();
    try {
        final Response response = messageFactory.createResponse(200, request);
        if(serverTransactionId == null) {
        	serverTransactionId = ((SipProvider)requestEvent.getSource()).getNewServerTransaction(request);
        }
        serverTransactionId.sendResponse(response);
    } catch (Exception ex) {
        ex.printStackTrace();
        //System.exit(0);

    }
}
 
开发者ID:YunlongYang,项目名称:LightSIP,代码行数:20,代码来源:Shootme.java

示例2: processBye

import javax.sip.RequestEvent; //导入方法依赖的package包/类
/**
 * Process the bye request.
 */
public void processBye(RequestEvent requestEvent,
        ServerTransaction serverTransactionId) {
    SipProvider sipProvider = (SipProvider) requestEvent.getSource();
    Request request = requestEvent.getRequest();
    Dialog dialog = requestEvent.getDialog();
    System.out.println("local party = " + dialog.getLocalParty());
    try {
        System.out.println("shootme:  got a bye sending OK.");
        Response response = messageFactory.createResponse(200, request);
        serverTransactionId.sendResponse(response);
        System.out.println("Dialog State is "
                + serverTransactionId.getDialog().getState());

    } catch (Exception ex) {
        ex.printStackTrace();
        System.exit(0);

    }
}
 
开发者ID:YunlongYang,项目名称:LightSIP,代码行数:23,代码来源:Shootme.java

示例3: processBye

import javax.sip.RequestEvent; //导入方法依赖的package包/类
/**
 * Process the bye request.
 */
public void processBye(RequestEvent requestEvent,
        ServerTransaction serverTransactionId) {
    SipProvider sipProvider = (SipProvider) requestEvent.getSource();
    Request request = requestEvent.getRequest();
    Dialog dialog = requestEvent.getDialog();
    logger.info("shootme: local party = " + dialog.getLocalParty());
    try {
        logger.info("shootme:  got a bye sending OK.");
        Response response = messageFactory.createResponse(200, request);
        serverTransactionId.sendResponse(response);
        logger.info("shootme: Dialog State is "
                + serverTransactionId.getDialog().getState());

    } catch (Exception ex) {
        logger.error("UNexpected exception",ex);
        fail("UNexpected exception");

    }
}
 
开发者ID:YunlongYang,项目名称:LightSIP,代码行数:23,代码来源:ServerTransactionRetransmissionTimerTest.java

示例4: processBye

import javax.sip.RequestEvent; //导入方法依赖的package包/类
/**
 * Process the bye request.
 */
public void processBye(RequestEvent requestEvent,
        ServerTransaction serverTransactionId) {
    SipProvider sipProvider = (SipProvider) requestEvent.getSource();
    Request request = requestEvent.getRequest();
    Dialog dialog = requestEvent.getDialog();
    System.out.println("local party = " + dialog.getLocalParty());
    try {
        System.out.println("shootme:  got a bye sending OK.");
        Response response = messageFactory.createResponse(200, request);
        serverTransactionId.sendResponse(response);
        System.out.println("Shootme : Dialog State is "
                + serverTransactionId.getDialog().getState());

    } catch (Exception ex) {
        ex.printStackTrace();
        System.exit(0);

    }
}
 
开发者ID:YunlongYang,项目名称:LightSIP,代码行数:23,代码来源:NoToTagOn1xxDialogLeakTest.java

示例5: processAck

import javax.sip.RequestEvent; //导入方法依赖的package包/类
/**
 * Process the ACK request.
 */
public void processAck(RequestEvent requestEvent,
        ServerTransaction serverTransaction) {
	final Dialog dialog = requestEvent.getDialog();
	final RequestExt request = (RequestExt) requestEvent.getRequest();
	if(((SipURI)request.getFromHeader().getAddress().getURI()).getUser().equalsIgnoreCase(TIMER_USER)) {
		timer.schedule(new ByeTask(dialog), BYE_DELAY) ;
	}
}
 
开发者ID:YunlongYang,项目名称:LightSIP,代码行数:12,代码来源:Shootme.java


注:本文中的javax.sip.RequestEvent.getDialog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。