コード例 #1
0
 /** Remove the transaction from transaction hash. */
 protected void removeTransactionHash(SIPTransaction sipTransaction) {
   SIPRequest sipRequest = sipTransaction.getOriginalRequest();
   if (sipRequest == null) return;
   if (sipTransaction instanceof SIPClientTransaction) {
     synchronized (clientTransactionTable) {
       String key = sipTransaction.getTransactionId();
       clientTransactionTable.remove(key);
     }
   } else if (sipTransaction instanceof SIPServerTransaction) {
     synchronized (serverTransactionTable) {
       String key = sipTransaction.getTransactionId();
       serverTransactionTable.remove(key);
     }
   }
 }
コード例 #2
0
 /** Remove transaction. */
 public void removeTransaction(SIPTransaction sipTransaction) {
   if (sipTransaction instanceof SIPServerTransaction) {
     synchronized (serverTransactions) {
       serverTransactions.remove(sipTransaction);
     }
     synchronized (serverTransactionTable) {
       String key = sipTransaction.getTransactionId();
       serverTransactionTable.remove(key);
     }
   } else {
     synchronized (clientTransactions) {
       clientTransactions.remove(sipTransaction);
     }
     synchronized (clientTransactionTable) {
       String key = sipTransaction.getTransactionId();
       clientTransactionTable.remove(key);
     }
   }
 }