Home | History | Annotate | Download | only in stack
      1 /*
      2  * This source code has been contributed to the public domain by Mobicents
      3  *
      4  * This software is provided by NIST as a service and is expressly
      5  * provided "AS IS."  NIST MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
      6  * OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
      7  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
      8  * AND DATA ACCURACY.  NIST does not warrant or make any representations
      9  * regarding the use of the software or the results thereof, including but
     10  * not limited to the correctness, accuracy, reliability or usefulness of
     11  * the software.
     12  *
     13  * Permission to use this software is contingent upon your acceptance
     14  * of the terms of this agreement.
     15  */
     16 package gov.nist.javax.sip.stack;
     17 
     18 
     19 import java.util.EventObject;
     20 
     21 /**
     22  * An event that indicates that a dialog has encountered an error.
     23  *
     24  * @author jean deruelle
     25  * @since 2.0
     26  */
     27 public class SIPDialogErrorEvent extends EventObject {
     28 
     29 
     30     /**
     31      * This event ID indicates that the transaction has timed out.
     32      */
     33     public static final int DIALOG_ACK_NOT_RECEIVED_TIMEOUT = 1;
     34 
     35     /**
     36      * This event ID indicates that there was an error sending a message using
     37      * the underlying transport.
     38      */
     39     public static final int DIALOG_ACK_NOT_SENT_TIMEOUT = 2;
     40 
     41     /**
     42      * This event ID indicates a timeout occured waiting to send re-INVITE ( for B2BUA)
     43      */
     44     public static final int DIALOG_REINVITE_TIMEOUT = 3;
     45 
     46 
     47     // ID of this error event
     48     private int errorID;
     49 
     50     /**
     51      * Creates a dialog error event.
     52      *
     53      * @param sourceDialog Dialog which is raising the error.
     54      * @param dialogErrorID ID of the error that has ocurred.
     55      */
     56     SIPDialogErrorEvent(
     57         SIPDialog sourceDialog,
     58         int dialogErrorID) {
     59 
     60         super(sourceDialog);
     61         errorID = dialogErrorID;
     62 
     63     }
     64 
     65     /**
     66      * Returns the ID of the error.
     67      *
     68      * @return Error ID.
     69      */
     70     public int getErrorID() {
     71         return errorID;
     72     }
     73 }
     74