Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Unpublished - rights reserved under the Copyright Laws of the United States. Copyright � 2003 Sun Microsystems, Inc. All rights reserved. Copyright � 2005 BEA Systems, Inc. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Module Name : JSIP Specification File Name : TimeoutEvent.java Author : Phelim O'Doherty HISTORY Version Date Author Comments 1.1 08/10/2002 Phelim O'Doherty Initial version ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 package javax.sip;
 
 import java.util.*;

This class represents an Timeout event that is passed from a SipProvider to its SipListener. A specific message may need retransmitted on a specific transaction numerous times before it is acknowledged by the receiver. If the message is not acknowledged after a specified period in the underlying implementation the transaction will expire, this occurs usually after seven retransmissions. The mechanism to alert an application that a message for a an underlying transaction needs retransmitted (i.e. 200OK) or an underlying transaction has expired is a Timeout Event.

A Timeout Event can be of two different types, namely:

A TimeoutEvent contains the following information:
  • source - the SipProvider that sent the TimeoutEvent.
  • transaction - the transaction that this Timeout applies to.
  • isServerTransaction - boolean indicating whether the transaction refers to a client or server transaction.
  • timeout - indicates what type of Timeout occurred.

Author(s):
BEA Systems, NIST
Version:
1.2
See also:
Timeout
 
 public class TimeoutEvent extends EventObject {

    
Constructs a TimeoutEvent to indicate a server retransmission or transaction timeout.

Parameters:
source - the source of TimeoutEvent.
serverTransaction - the server transaction that timed out.
timeout - indicates if this is a retranmission or transaction timeout event.
 
     public TimeoutEvent(Object sourceServerTransaction serverTransactionTimeout timeout) {
         super(source);
          = serverTransaction;
          = true;
          = timeout;
    }


    
Constructs a TimeoutEvent to indicate a client retransmission or transaction timeout.

Parameters:
source - source of TimeoutEvent.
clientTransaction - the client transaction that timed out.
timeout - indicates if this is a retranmission or transaction timeout event.
 
     public TimeoutEvent(Object sourceClientTransaction clientTransactionTimeout timeout) {
         super(source);
          = clientTransaction;
          = false;
          = timeout;
    }    

    
Gets the server transaction associated with this TimeoutEvent.

Returns:
server transaction associated with this TimeoutEvent, or null if this event is specific to a client transaction.
 
         return ;
     }


    
Gets the client transaction associated with this TimeoutEvent.

Returns:
client transaction associated with this TimeoutEvent, or null if this event is specific to a server transaction.
        return ;
    }   

    
Indicates if the transaction associated with this TimeoutEvent is a server transaction.

Returns:
returns true if a server transaction or false if a client transaction.
    public boolean isServerTransaction() {
        return ;
    }

    
Gets the event type of this TimeoutEvent. The event type can be used to determine if this Timeout Event is one of the following types:

Returns:
the event type of this TimeoutEvent
    public Timeout getTimeout() {
        return ;
    }
    // internal variables
    private Timeout m_timeout;
    private boolean m_isServerTransaction;
    private ServerTransaction m_serverTransaction = null;
    private ClientTransaction m_clientTransaction = null;
New to GrepCode? Check out our FAQ X