JSIP API v1.2
November 2006

javax.sip
Class IOExceptionEvent

java.lang.Object
  extended by java.util.EventObject
      extended by javax.sip.IOExceptionEvent
All Implemented Interfaces:
java.io.Serializable

public class IOExceptionEvent
extends java.util.EventObject

This object is used to signal to the application that an IO Exception has occured. The transaction state machine requires to report asynchronous IO Exceptions to the application immediately (according to RFC 3261). This class represents an IOExceptionEvent that is passed from a SipProvider to its SipListener. This event enables an implementation to propagate the asynchronous handling of IO Exceptions to the application. An application (SipListener) will register with the SIP protocol stack (SipProvider) and listen for IO Exceptions from the SipProvider. In many cases, when sending a SIP message, the sending function will return before the message was actually sent. This will happen for example if there is a need to wait for a response from a DNS server or to perform other asynchronous actions such as connecting a TCP connection. Later on if the message sending fails an IO exception event will be given to the application. IO Exception events may also be reported asynchronously when the Transaction State machine attempts to resend a pending request. Note that synchronous IO Exceptions are presented to the caller as SipException.

Since:
v1.2
Author:
BEA Systems, NIST
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
IOExceptionEvent(java.lang.Object source, java.lang.String remoteHost, int port, java.lang.String transport)
          Constructor
 
Method Summary
 java.lang.String getHost()
          Return the host where Socket was pointing.
 int getPort()
          Returns the port where the socket was trying to send amessage.
 java.lang.String getTransport()
          Return transport used for the failed write attempt.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IOExceptionEvent

public IOExceptionEvent(java.lang.Object source,
                        java.lang.String remoteHost,
                        int port,
                        java.lang.String transport)
Constructor

Parameters:
source - -- the object that is logically deemed to have caused the IO Exception (dialog/transaction/provider).
remoteHost - -- host where the request/response was heading
port - -- port where the request/response was heading
transport - -- transport ( i.e. UDP/TCP/TLS).
Method Detail

getHost

public java.lang.String getHost()
Return the host where Socket was pointing.

Returns:
host

getPort

public int getPort()
Returns the port where the socket was trying to send amessage.

Returns:
port associated with the IOException

getTransport

public java.lang.String getTransport()
Return transport used for the failed write attempt.

Returns:
the transaction associated with the IOException

JSIP API v1.2
November 2006

If you have any comments, please mail them to JAIN-SIP-INTEREST@java.sun.com after subscribing at http://archives.java.sun.com
Copyright - 2006 BEA Systems and Sun Microsystems