code: public void deattach(JainMgcpListener listener) {
          int identifier = -1;
          
          //search identifier of the specified listener 
          Set<Integer> IDs = txListeners.keySet();        
          for (Integer id : IDs) {
              if (txListeners.get(id) == listener) {
                  identifier = id;
                  break;
              }
          }
          
          //remove it from list if found
          if (identifier != -1) {
              txListeners.remove(identifier);
          }
      }
docs: Deattaches transaction listener upon user request.
  
  @param listener the listener to deattach.