本文整理汇总了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() );
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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);
}