Beispiel #1
0
 public void processTransactionTerminated(TransactionTerminatedEvent transactionTerminatedEvent) {
   if (transactionTerminatedEvent.isServerTransaction())
     System.out.println(
         "Transaction terminated event recieved"
             + transactionTerminatedEvent.getServerTransaction());
   else
     System.out.println(
         "Transaction terminated " + transactionTerminatedEvent.getClientTransaction());
 }
  /**
   * Dispatches the event received from a JAIN-SIP <tt>SipProvider</tt> to one of our "candidate
   * recipient" listeners.
   *
   * @param event the event received for a <tt>SipProvider</tt>.
   */
  public void processTransactionTerminated(TransactionTerminatedEvent event) {
    try {
      Transaction transaction;
      if (event.isServerTransaction()) transaction = event.getServerTransaction();
      else transaction = event.getClientTransaction();

      ProtocolProviderServiceSipImpl recipient = getServiceData(transaction);

      if (recipient == null) {
        logger.error(
            "We received a transaction terminated which wasn't"
                + " marked, please report this to"
                + " [email protected]");
      } else {
        recipient.processTransactionTerminated(event);
      }
    } catch (Throwable exc) {
      // any exception thrown within our code should be caught here
      // so that we could log it rather than interrupt stack activity with
      // it.
      this.logApplicationException(DialogTerminatedEvent.class, exc);
    }
  }