FileDocCategorySizeDatePackage
TimeoutEvent.javaAPI DocphoneME MR2 API (J2ME)5363Wed May 02 18:00:42 BST 2007gov.nist.siplite

TimeoutEvent

public class TimeoutEvent extends SipEvent
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:

  • {@link Timeout#RETRANSMIT}
  • {@link Timeout#TRANSACTION}
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 {@link Timeout} occurred.
see
Timeout
since
v1.1

Fields Summary
private boolean
m_isServerTransaction
Flag indicating server transaction.
private ServerTransaction
m_serverTransaction
Current server transaction.
private ClientTransaction
m_clientTransaction
Current client transaction.
private Timeout
m_timeout
Current transaction timeout.
Constructors Summary
public TimeoutEvent(Object source, ServerTransaction serverTransaction)
Constructs a TimeoutEvent to indicate a server retransmission or transaction timeout.

param
source - the source of TimeoutEvent.
param
serverTransaction - the server transaction that timed out.

        super(source);
        m_serverTransaction = serverTransaction;
        m_isServerTransaction = true;
    
public TimeoutEvent(Object source, ClientTransaction clientTransaction)
Constructs a TimeoutEvent to indicate a client retransmission or transaction timeout.

param
source - source of TimeoutEvent.
param
clientTransaction - the client transaction that timed out.

        super(source);
        m_clientTransaction = clientTransaction;
        m_isServerTransaction = false;
    
public TimeoutEvent(Object source, ClientTransaction clientTransaction, Timeout timeout)
Constructs a TimeoutEvent to indicate a client retransmission or transaction timeout.

param
source - source of TimeoutEvent.
param
clientTransaction - the client transaction that timed out.
param
timeout - indicates if this is a retranmission or transaction timeout event.

        super(source);
        m_clientTransaction = clientTransaction;
        m_isServerTransaction = false;
        m_timeout = timeout;
    
Methods Summary
public ClientTransactiongetClientTransaction()
Gets the client transaction associated with this TimeoutEvent.

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

        return m_clientTransaction;
    
public ServerTransactiongetServerTransaction()
Gets the server transaction associated with this TimeoutEvent.

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

        return m_serverTransaction;
    
public booleanisServerTransaction()
Indicates if the transaction associated with this TimeoutEvent is a server transaction.

return
returns true if a server transaction or false if a client transaction.

        return m_isServerTransaction;