本文整理了Java中jain.protocol.ip.mgcp.message.Notify.getObservedEvents()
方法的一些代码示例,展示了Notify.getObservedEvents()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Notify.getObservedEvents()
方法的具体详情如下:
包路径:jain.protocol.ip.mgcp.message.Notify
类名称:Notify
方法名:getObservedEvents
暂无
代码示例来源:origin: org.restcomm/restcomm-connect.mgcp
private boolean isPartialNotify(final Notify notify) {
EventName[] events = notify.getObservedEvents();
return events != null && events.length != 0 && MgcpUtil.isPartialNotify(events[events.length - 1]);
}
代码示例来源:origin: org.mobicents.media.client/jsr-309-driver
public void processMgcpCommandEvent(JainMgcpCommandEvent event) {
switch (event.getObjectIdentifier()) {
case Constants.CMD_NOTIFY :
Notify notify = (Notify) event;
EventName[] events = notify.getObservedEvents();
for (EventName evt: events) {
fireEvent(evt);
}
break;
default :
return;
}
}
代码示例来源:origin: org.mobicents.media.client/jsr-309-driver
public void processMgcpCommandEvent(JainMgcpCommandEvent event) {
switch (event.getObjectIdentifier()) {
case Constants.CMD_NOTIFY :
Notify notify = (Notify) event;
EventName[] events = notify.getObservedEvents();
for (EventName evt: events) {
fireEvent(evt);
}
break;
default :
return;
}
}
代码示例来源: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 event) {
switch (event.getObjectIdentifier()) {
case Constants.CMD_NOTIFY :
Notify notify = (Notify) event;
EventName[] events = notify.getObservedEvents();
for (EventName evt: events) {
fireEvent(evt);
}
break;
default :
return;
}
}
代码示例来源:origin: org.mobicents.jsr309/mobicents-jsr309-impl
public void processMgcpCommandEvent(JainMgcpCommandEvent event) {
switch (event.getObjectIdentifier()) {
case Constants.CMD_NOTIFY :
Notify notify = (Notify) event;
EventName[] events = notify.getObservedEvents();
for (EventName evt: events) {
fireEvent(evt);
}
break;
default :
return;
}
}
代码示例来源:origin: org.mobicents.media.client/jsr-309-driver
private void processNotify(Notify notify) {
EventName[] events = notify.getObservedEvents();
for (EventName evt : events) {
switch (evt.getEventIdentifier().intValue()) {
case MgcpEvent.REPORT_ON_COMPLETION:
fireEvent(evt.getEventIdentifier().getParms());
break;
case MgcpEvent.REPORT_FAILURE:
break;
}
}
}
代码示例来源:origin: org.mobicents.jsr309/mobicents-jsr309-impl
private void processNotify(Notify notify) {
EventName[] events = notify.getObservedEvents();
for (EventName evt : events) {
switch (evt.getEventIdentifier().intValue()) {
case MgcpEvent.REPORT_ON_COMPLETION:
fireEvent(evt.getEventIdentifier().getParms());
break;
case MgcpEvent.REPORT_FAILURE:
break;
}
}
}
代码示例来源:origin: org.mobicents.media.client/mgcp-driver
totalLength+=EventNameHandler.encodeList(array,totalLength,evt.getObservedEvents());
array[totalLength++]=StringFunctions.NEWLINE_BYTE;
代码示例来源:origin: ua.mobius.media.client/mgcp-driver
totalLength+=EventNameHandler.encodeList(array,totalLength,evt.getObservedEvents());
array[totalLength++]=StringFunctions.NEWLINE_BYTE;
代码示例来源:origin: org.mobicents.servlet.sip/restcomm.media
final Notify request = (Notify)command;
if(requestId != null && request.getRequestIdentifier().toString().equals(requestId.toString())) {
final EventName[] observedEvents = request.getObservedEvents();
代码示例来源:origin: org.restcomm/restcomm-connect.mgcp
gateway.tell(response, self);
final EventName[] observedEvents = notification.getObservedEvents();
if (observedEvents.length == 1) {
final MgcpEvent event = observedEvents[0].getEventIdentifier();
代码示例来源:origin: org.mobicents.examples/mgcp-demo-tts-sbb
public void onNotifyRequest(Notify event, ActivityContextInterface aci) {
logger.info("onNotifyRequest");
NotificationRequestResponse response = new NotificationRequestResponse(event.getSource(),
ReturnCode.Transaction_Executed_Normally);
response.setTransactionHandle(event.getTransactionHandle());
mgcpProvider.sendMgcpEvents(new JainMgcpEvent[] { response });
EventName[] observedEvents = event.getObservedEvents();
for (EventName observedEvent : observedEvents) {
switch (observedEvent.getEventIdentifier().intValue()) {
case MgcpEvent.REPORT_ON_COMPLETION:
logger.info("Announcemnet Completed NTFY received");
break;
case MgcpEvent.REPORT_FAILURE:
logger.info("Announcemnet Failed received");
// TODO : Send DLCX and Send BYE to UA
break;
default:
//MGCP RI expects D/dtmfX, but correct is D/X ... hence it fails to match on
//MgcpEvent.DTMF_X .... Thus event ID is wrong....
if(observedEvent.getPackageName().toString().equals("D"))
{
int decodedId = decodeDTMF(observedEvent);
processDTMF(decodedId);
}
}
}
}
代码示例来源:origin: org.mobicents.examples/call-controller2-sbbs
EventName[] observedEvents = event.getObservedEvents();
代码示例来源:origin: org.mobicents.examples/mgcp-demo-recorder-sbb
EventName[] observedEvents = event.getObservedEvents();
内容来源于网络,如有侵权,请联系作者删除!