本文整理了Java中jain.protocol.ip.mgcp.message.Notify.getRequestIdentifier()
方法的一些代码示例,展示了Notify.getRequestIdentifier()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Notify.getRequestIdentifier()
方法的具体详情如下:
包路径:jain.protocol.ip.mgcp.message.Notify
类名称:Notify
方法名:getRequestIdentifier
暂无
代码示例来源:origin: org.mobicents.jain/mobicents-mgcp-impl
@Override
public String encode(JainMgcpCommandEvent event) {
Notify notify = (Notify) event;
StringBuffer message = new StringBuffer();
message.append("NTFY ").append(event.getTransactionHandle()).append(SINGLE_CHAR_SPACE).append(
notify.getEndpointIdentifier()).append(MGCP_VERSION).append(NEW_LINE);
if (notify.getNotifiedEntity() != null) {
message.append("N: ").append(notify.getNotifiedEntity()).append(NEW_LINE);
}
message.append("X: ").append(notify.getRequestIdentifier()).append(NEW_LINE);
Utils utils = utilsFactory.allocate();
message.append("O: ").append(utils.encodeEventNames(notify.getObservedEvents())).append(NEW_LINE);
utilsFactory.deallocate(utils);
return message.toString();
}
代码示例来源:origin: org.mobicents.jsr309/mobicents-jsr309-impl
public void processMgcpCommandEvent(JainMgcpCommandEvent evt) {
//we are expecting two types of commands:
//-delete connection notification (in case of failure connection on server side)
//-notify
switch (evt.getObjectIdentifier()) {
case Constants.CMD_DELETE_CONNECTION :
//TODO: handle delete connection request from server;
break;
case Constants.CMD_NOTIFY :
Notify event = (Notify) evt;
//if there is attached handler deligate call to it
if (this.requestListeners.containsKey(event.getRequestIdentifier().toString().trim())) {
requestListeners.get(event.getRequestIdentifier().toString().trim()).processMgcpCommandEvent(evt);
}
//send response to this transaction;
NotifyResponse response = new NotifyResponse(this, ReturnCode.Transaction_Executed_Normally);
response.setTransactionHandle(evt.getTransactionHandle());
this.send(response);
break;
default :
}
}
代码示例来源:origin: org.mobicents.media.client/jsr-309-driver
public void processMgcpCommandEvent(JainMgcpCommandEvent evt) {
//we are expecting two types of commands:
//-delete connection notification (in case of failure connection on server side)
//-notify
switch (evt.getObjectIdentifier()) {
case Constants.CMD_DELETE_CONNECTION :
//TODO: handle delete connection request from server;
break;
case Constants.CMD_NOTIFY :
Notify event = (Notify) evt;
//if there is attached handler deligate call to it
if (this.requestListeners.containsKey(event.getRequestIdentifier().toString().trim())) {
requestListeners.get(event.getRequestIdentifier().toString().trim()).processMgcpCommandEvent(evt);
}
//send response to this transaction;
NotifyResponse response = new NotifyResponse(this, ReturnCode.Transaction_Executed_Normally);
response.setTransactionHandle(evt.getTransactionHandle());
this.send(response);
break;
default :
}
}
代码示例来源:origin: org.restcomm/restcomm-connect.mgcp
@Override
public void processMgcpCommandEvent(final JainMgcpCommandEvent event) {
final int value = event.getObjectIdentifier();
switch (value) {
case Constants.CMD_NOTIFY: {
final Notify notify = (Notify) event;
final String id = notify.getRequestIdentifier().toString();
final ActorRef listener;
if (isPartialNotify(notify)) {
listener = notificationListeners.get(id);
} else {
listener = notificationListeners.remove(id);
}
if (listener != null) {
listener.tell(notify, self());
}
}
}
}
代码示例来源:origin: ua.mobius.media.client/mgcp-driver
byte[] requestBytes=evt.getRequestIdentifier().toString().getBytes();
System.arraycopy(requestBytes, 0, array,totalLength, requestBytes.length);
totalLength+=requestBytes.length;
代码示例来源:origin: org.mobicents.media.client/mgcp-driver
byte[] requestBytes=evt.getRequestIdentifier().toString().getBytes();
System.arraycopy(requestBytes, 0, array,totalLength, requestBytes.length);
totalLength+=requestBytes.length;
代码示例来源:origin: org.mobicents.servlet.sip/restcomm.media
case Constants.CMD_NOTIFY: {
final Notify request = (Notify)command;
if(requestId != null && request.getRequestIdentifier().toString().equals(requestId.toString())) {
final EventName[] observedEvents = request.getObservedEvents();
内容来源于网络,如有侵权,请联系作者删除!