@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(); }
array[totalLength++]=StringFunctions.NEWLINE_BYTE; if (evt.getNotifiedEntity() != null) totalLength+=NotifiedEntityHandler.encode(array,totalLength,evt.getNotifiedEntity()); array[totalLength++]=StringFunctions.NEWLINE_BYTE;
array[totalLength++]=StringFunctions.NEWLINE_BYTE; if (evt.getNotifiedEntity() != null) totalLength+=NotifiedEntityHandler.encode(array,totalLength,evt.getNotifiedEntity()); array[totalLength++]=StringFunctions.NEWLINE_BYTE;
case Constants.CMD_NOTIFY: Notify notifyCommand = (Notify) event; NotifiedEntity notifiedEntity = notifyCommand.getNotifiedEntity(); if (notifiedEntity == null) { notifiedEntity = this.stack.provider.getNotifiedEntity();
if (logger.isDebugEnabled()) { logger.debug("Sending Notify object to NotifiedEntity" + ((Notify) commandEvent).getNotifiedEntity());
if (logger.isDebugEnabled()) { logger.debug("Sending Notify object to NotifiedEntity" + ((Notify) commandEvent).getNotifiedEntity());
case Constants.CMD_NOTIFY: Notify notifyCommand = (Notify) event; NotifiedEntity notifiedEntity = notifyCommand.getNotifiedEntity(); if (notifiedEntity == null) { notifiedEntity = this.stack.provider.getNotifiedEntity();
case Constants.CMD_NOTIFY: Notify notifyCommand = (Notify) event; NotifiedEntity notifiedEntity = notifyCommand.getNotifiedEntity(); if (notifiedEntity == null) { notifiedEntity = this.stack.provider.getNotifiedEntity();
if (logger.isDebugEnabled()) { logger.debug("Sending Notify object to NotifiedEntity" + ((Notify) commandEvent).getNotifiedEntity());