Home | History | Annotate | Download | only in stack
      1 /*
      2 * Conditions Of Use
      3 *
      4 * This software was developed by employees of the National Institute of
      5 * Standards and Technology (NIST), an agency of the Federal Government.
      6 * Pursuant to title 15 Untied States Code Section 105, works of NIST
      7 * employees are not subject to copyright protection in the United States
      8 * and are considered to be in the public domain.  As a result, a formal
      9 * license is not needed to use the software.
     10 *
     11 * This software is provided by NIST as a service and is expressly
     12 * provided "AS IS."  NIST MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
     13 * OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
     14 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
     15 * AND DATA ACCURACY.  NIST does not warrant or make any representations
     16 * regarding the use of the software or the results thereof, including but
     17 * not limited to the correctness, accuracy, reliability or usefulness of
     18 * the software.
     19 *
     20 * Permission to use this software is contingent upon your acceptance
     21 * of the terms of this agreement
     22 *
     23 * .
     24 *
     25 */
     26 package gov.nist.javax.sip.stack;
     27 
     28 
     29 import java.util.EventObject;
     30 
     31 /**
     32  * An event that indicates that a transaction has encountered an error.
     33  *
     34  *
     35  * @author Jeff Keyser
     36  * @author M. Ranganathan
     37  *
     38  *
     39  *
     40  * @version 1.2 $Revision: 1.7 $ $Date: 2009/07/17 18:58:15 $
     41  */
     42 public class SIPTransactionErrorEvent extends EventObject {
     43 
     44     /**
     45      * Comment for <code>serialVersionUID</code>
     46      */
     47     private static final long serialVersionUID = -2713188471978065031L;
     48 
     49     /**
     50      * This event ID indicates that the transaction has timed out.
     51      */
     52     public static final int TIMEOUT_ERROR = 1;
     53 
     54     /**
     55      * This event ID indicates that there was an error sending a message using
     56      * the underlying transport.
     57      */
     58     public static final int TRANSPORT_ERROR = 2;
     59 
     60     /**
     61      * Retransmit signal to application layer.
     62      */
     63     public static final int TIMEOUT_RETRANSMIT = 3;
     64 
     65 
     66 
     67     // ID of this error event
     68     private int errorID;
     69 
     70     /**
     71      * Creates a transaction error event.
     72      *
     73      * @param sourceTransaction Transaction which is raising the error.
     74      * @param transactionErrorID ID of the error that has ocurred.
     75      */
     76     SIPTransactionErrorEvent(
     77         SIPTransaction sourceTransaction,
     78         int transactionErrorID) {
     79 
     80         super(sourceTransaction);
     81         errorID = transactionErrorID;
     82 
     83     }
     84 
     85     /**
     86      * Returns the ID of the error.
     87      *
     88      * @return Error ID.
     89      */
     90     public int getErrorID() {
     91         return errorID;
     92     }
     93 }
     94