@Override public String encode(JainMgcpCommandEvent event) { Utils utils = utilsFactory.allocate(); NotificationRequest req = (NotificationRequest) event; StringBuffer buffer = new StringBuffer(); buffer.append("RQNT ").append(event.getTransactionHandle()).append(SINGLE_CHAR_SPACE).append( req.getEndpointIdentifier()).append(SINGLE_CHAR_SPACE).append(MGCP_VERSION).append(NEW_LINE); if (req.getNotifiedEntity() != null) { buffer.append("N:").append(req.getNotifiedEntity()).append(NEW_LINE); } buffer.append("X:").append(req.getRequestIdentifier()).append(NEW_LINE); if (req.getDigitMap() != null) { buffer.append("D:").append(req.getDigitMap()).append(NEW_LINE); } if (req.getSignalRequests() != null) { buffer.append("S:").append(utils.encodeEventNames(req.getSignalRequests())).append(NEW_LINE); } if (req.getRequestedEvents() != null) { buffer.append("R:").append(utils.encodeRequestedEvents(req.getRequestedEvents())).append(NEW_LINE); } if (req.getDetectEvents() != null) { buffer.append("T:").append(utils.encodeEventNames(req.getDetectEvents())).append(NEW_LINE); } utilsFactory.deallocate(utils); return buffer.toString(); }
if (evt.getRequestedEvents() != null) totalLength+=RequestedEventHandler.encodeList(array,totalLength,evt.getRequestedEvents()); array[totalLength++]=StringFunctions.NEWLINE_BYTE;
if (evt.getRequestedEvents() != null) totalLength+=RequestedEventHandler.encodeList(array,totalLength,evt.getRequestedEvents()); array[totalLength++]=StringFunctions.NEWLINE_BYTE;
if (this.endpointId.equals(nRequest.getEndpointIdentifier().toString())) { processRequestedEvents(nRequest.getNotifiedEntity(), nRequest.getRequestedEvents()); } else if (isWildCardEndpointName(nRequest.getEndpointIdentifier().toString())) {
new RequestedEvent(new EventName(PackageName.Dtmf, MgcpEvent.factory("#")/* , connectionID */), actions) }; if(notificationRequest.getRequestedEvents()!=null) for(RequestedEvent re:notificationRequest.getRequestedEvents())