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


Java RequestEvent.getServerTransaction方法代码示例

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


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

示例1: processRequest

import javax.sip.RequestEvent; //导入方法依赖的package包/类
public void processRequest(RequestEvent requestReceivedEvent) {
    Request request = requestReceivedEvent.getRequest();
    ServerTransaction serverTransactionId = requestReceivedEvent
            .getServerTransaction();
    String viaBranch = ((ViaHeader)(request.getHeaders(ViaHeader.NAME).next())).getParameter("branch");

    logger.info("\n\nRequest " + request.getMethod() + " received at "
            + sipStack.getStackName() + " with server transaction id "
            + serverTransactionId +
            " branch ID = " + viaBranch);
    //logger.info( request );
    if (request.getMethod().equals(Request.NOTIFY)) {
        processNotify(requestReceivedEvent, serverTransactionId);
    } else if ( request.getMethod().equals(Request.INVITE)) {
        processInvite( requestReceivedEvent );
    } else if ( request.getMethod().equals(Request.ACK)) {
        processAck( requestReceivedEvent );
    } else if ( request.getMethod().equals(Request.BYE)) {
        processBye( requestReceivedEvent );
    } else {
        TestHarness.fail( "Unexpected request type:" + request.getMethod() );
    }

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

示例2: processRequest

import javax.sip.RequestEvent; //导入方法依赖的package包/类
public void processRequest(RequestEvent requestEvent) {
    Request request = requestEvent.getRequest();
    ServerTransaction serverTransactionId = requestEvent.getServerTransaction();

    System.out.println("GOT REQUEST: " + request.getMethod());

    if (request.getMethod().equals(Request.INVITE) || request.getMethod().equals(Request.MESSAGE)) {
        processInvite(requestEvent, serverTransactionId);
    } else if (request.getMethod().equals(Request.ACK)) {
        processAck(requestEvent, serverTransactionId);
    } else if (request.getMethod().equals(Request.INFO)) {
        processInfo(requestEvent);
    } else if (request.getMethod().equals(Request.BYE)) {
        processBye(requestEvent, serverTransactionId);
    } 

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

示例3: processRequest

import javax.sip.RequestEvent; //导入方法依赖的package包/类
public void processRequest(RequestEvent requestEvent) {
    Request request = requestEvent.getRequest();
    ServerTransaction serverTransactionId = requestEvent
            .getServerTransaction();

    logger.info("\n\nRequest " + request.getMethod() + " received at "
            + protocolObjects.sipStack.getStackName()
            + " with server transaction id " + serverTransactionId);

    if (request.getMethod().equals(Request.INVITE)) {
        processInvite(requestEvent, serverTransactionId);
    } else if (request.getMethod().equals(Request.ACK)) {
        processAck(requestEvent, serverTransactionId);
    } else if (request.getMethod().equals(Request.BYE)) {
        processBye(requestEvent, serverTransactionId);
    }

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

示例4: processRequest

import javax.sip.RequestEvent; //导入方法依赖的package包/类
public void processRequest(RequestEvent requestReceivedEvent) {
    Request request = requestReceivedEvent.getRequest();
    ServerTransaction serverTransactionId = requestReceivedEvent
            .getServerTransaction();

    logger.info("\n\nRequest " + request.getMethod() + " received at "
            + protocolObjects.sipStack.getStackName()
            + " with server transaction id " + serverTransactionId);

    if (request.getMethod().equals(Request.BYE))
        processBye(request, serverTransactionId);
    else if (request.getMethod().equals(Request.ACK))
        processAck(request, serverTransactionId);
    else if (request.getMethod().equals(Request.INVITE))
        processInvite(request, serverTransactionId);
}
 
开发者ID:YunlongYang,项目名称:LightSIP,代码行数:17,代码来源:SelfroutingTest.java

示例5: processRequest

import javax.sip.RequestEvent; //导入方法依赖的package包/类
public void processRequest(RequestEvent requestEvent) {
    Request request = requestEvent.getRequest();
    ServerTransaction serverTransactionId = requestEvent.getServerTransaction();

    System.out.println("GOT REQUEST: " + request.getMethod());

    if (request.getMethod().equals(Request.INVITE)) {
        processInvite(requestEvent, serverTransactionId);
    } else if (request.getMethod().equals(Request.ACK)) {
        processAck(requestEvent, serverTransactionId);
    } else if (request.getMethod().equals(Request.INFO)) {
        processInfo(requestEvent);
    } else if (request.getMethod().equals(Request.BYE)) {
        processBye(requestEvent, serverTransactionId);
    } 

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

示例6: processRequest

import javax.sip.RequestEvent; //导入方法依赖的package包/类
public void processRequest(RequestEvent requestReceivedEvent) {
    Request request = requestReceivedEvent.getRequest();
    ServerTransaction serverTransactionId = requestReceivedEvent
            .getServerTransaction();

    logger.info("\n\nRequest " + request.getMethod() + " received at "
            + protocolObjects.sipStack.getStackName()
            + " with server transaction id " + serverTransactionId);

    if (request.getMethod().equals(Request.BYE))
        processBye(request, serverTransactionId);
    else if (request.getMethod().equals(Request.INVITE))
        processInvite(request, serverTransactionId);
    else if (request.getMethod().equals(Request.ACK))
        processAck(request, serverTransactionId);

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

示例7: processRequest

import javax.sip.RequestEvent; //导入方法依赖的package包/类
public void processRequest(RequestEvent requestEvent) {
    Request request = requestEvent.getRequest();
    ServerTransaction serverTransactionId = requestEvent
            .getServerTransaction();

    logger.info("\n\nRequest " + request.getMethod() + " received at "
            + sipStack.getStackName() + " with server transaction id "
            + serverTransactionId);

    if (request.getMethod().equals(Request.INVITE)) {
        processInvite(requestEvent, serverTransactionId);
    } else if (request.getMethod().equals(Request.ACK)) {
        processAck(requestEvent, serverTransactionId);
    } else if (request.getMethod().equals(Request.BYE)) {
        processBye(requestEvent, serverTransactionId);
    } else if (request.getMethod().equals(Request.PRACK)) {
        processPrack(requestEvent, serverTransactionId);
    }

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

示例8: processRequest

import javax.sip.RequestEvent; //导入方法依赖的package包/类
public void processRequest(RequestEvent requestEvent) {
    Request request = requestEvent.getRequest();
    ServerTransaction serverTransactionId = requestEvent
            .getServerTransaction();

    System.out.println("\n\nRequest " + request.getMethod()
            + " received at " + sipStack.getStackName()
            + " with server transaction id " + serverTransactionId);

    if (request.getMethod().equals(Request.INVITE)) {
        processInvite(requestEvent, serverTransactionId);
    } else if(request.getMethod().equals(Request.ACK)) {
        processAck(requestEvent, serverTransactionId);
    }

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

示例9: processRequest

import javax.sip.RequestEvent; //导入方法依赖的package包/类
public void processRequest(RequestEvent requestEvent) {
    Request request = requestEvent.getRequest();
    ServerTransaction serverTransactionId = requestEvent
            .getServerTransaction();

    logger.info("\n\nRequest " + request.getMethod()
            + " received at " + sipStack.getStackName()
            + " with server transaction id " + serverTransactionId);

    if (request.getMethod().equals(Request.INVITE)) {
        processInvite(requestEvent, serverTransactionId);
    } else if (request.getMethod().equals(Request.ACK)) {
        processAck(requestEvent, serverTransactionId);
    } else if (request.getMethod().equals(Request.BYE)) {
        processBye(requestEvent, serverTransactionId);
    } 

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

示例10: processRequest

import javax.sip.RequestEvent; //导入方法依赖的package包/类
public void processRequest(RequestEvent requestReceivedEvent) {
    Request request = requestReceivedEvent.getRequest();
    ServerTransaction serverTransactionId = requestReceivedEvent
            .getServerTransaction();

    logger.info("\n\nRequest " + request.getMethod()
            + " received at " + sipStack.getStackName()
            + " with server transaction id " + serverTransactionId);

    // We are the UAC so the only request we get is the BYE.
    if (request.getMethod().equals(Request.BYE))
        processBye(request, serverTransactionId);
    else {
        try {
            serverTransactionId.sendResponse(messageFactory
                    .createResponse(202, request));
        } catch (Exception e) {
            fail("Unexpected exception");
            logger.error("Unexpected exception", e);
        }
    }

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

示例11: processRequest

import javax.sip.RequestEvent; //导入方法依赖的package包/类
public void processRequest(RequestEvent requestEvent) {
    Request request = requestEvent.getRequest();
    ServerTransaction serverTransactionId = requestEvent
            .getServerTransaction();

    System.out.println("\n\nRequest " + request.getMethod()
            + " received at " + sipStack.getStackName()
            + " with server transaction id " + serverTransactionId);

    if (request.getMethod().equals(Request.INVITE)) {
        processInvite(requestEvent, serverTransactionId);
    }

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

示例12: processRequest

import javax.sip.RequestEvent; //导入方法依赖的package包/类
public void processRequest(RequestEvent requestEvent) {
    final Request request = requestEvent.getRequest();
    final ServerTransaction serverTransactionId = requestEvent.getServerTransaction();

    if (request.getMethod().equals(Request.INVITE)) {
        processInvite(requestEvent, serverTransactionId);
    } else if (request.getMethod().equals(Request.ACK)) {
        processAck(requestEvent, serverTransactionId);
    } else if (request.getMethod().equals(Request.BYE)) {
        processBye(requestEvent, serverTransactionId);
    } else if (request.getMethod().equals(Request.CANCEL)) {
        processCancel(requestEvent, serverTransactionId);
    }

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

示例13: processRequest

import javax.sip.RequestEvent; //导入方法依赖的package包/类
public void processRequest(RequestEvent requestReceivedEvent) {
    Request request = requestReceivedEvent.getRequest();
    ServerTransaction serverTransactionId = requestReceivedEvent
            .getServerTransaction();

    logger.info("\n\nRequest " + request.getMethod() + " received at "
            + sipStack.getStackName() + " with server transaction id "
            + serverTransactionId);

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

示例14: processRequest

import javax.sip.RequestEvent; //导入方法依赖的package包/类
public void processRequest(RequestEvent requestEvent) {
    Request request = requestEvent.getRequest();
    ServerTransaction serverTransactionId = requestEvent.getServerTransaction();

    System.out.println("\n\nRequest " + request.getMethod() + " received at "
            + sipStack.getStackName() + " with server transaction id "
            + serverTransactionId);

    if (request.getMethod().equals(Request.INVITE)) {
        processInvite(requestEvent);
    }

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

示例15: processRequest

import javax.sip.RequestEvent; //导入方法依赖的package包/类
public void processRequest(RequestEvent requestReceivedEvent) {
    Request request = requestReceivedEvent.getRequest();
    ServerTransaction serverTransactionId = requestReceivedEvent
            .getServerTransaction();

    logger.info("\n\nRequest " + request.getMethod() + " received at "
            + protocolObjects.sipStack.getStackName()
            + " with server transaction id " + serverTransactionId);

    if (request.getMethod().equals(Request.BYE))
        processBye(request, serverTransactionId);
}
 
开发者ID:YunlongYang,项目名称:LightSIP,代码行数:13,代码来源:AckReTransmissionTest.java


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