com.mysql.jdbc
Class CommunicationsException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.sql.SQLException
              extended by com.mysql.jdbc.CommunicationsException
All Implemented Interfaces:
StreamingNotifiable, java.io.Serializable, java.lang.Iterable<java.lang.Throwable>
Direct Known Subclasses:
ConnectionFeatureNotAvailableException

public class CommunicationsException
extends java.sql.SQLException
implements StreamingNotifiable

An exception to represent communications errors with the database. Attempts to provide 'friendler' error messages to end-users, including last time a packet was sent to the database, what the client-timeout is set to, and whether the idle time has been exceeded.

See Also:
Serialized Form

Constructor Summary
CommunicationsException(ConnectionImpl conn, long lastPacketSentTimeMs, long lastPacketReceivedTimeMs, java.lang.Exception underlyingException)
           
 
Method Summary
 java.lang.String getMessage()
           
 java.lang.String getSQLState()
           
 void setWasStreamingResults()
           
 
Methods inherited from class java.sql.SQLException
getErrorCode, getNextException, iterator, setNextException
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommunicationsException

public CommunicationsException(ConnectionImpl conn,
                               long lastPacketSentTimeMs,
                               long lastPacketReceivedTimeMs,
                               java.lang.Exception underlyingException)
Method Detail

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable

getSQLState

public java.lang.String getSQLState()
Overrides:
getSQLState in class java.sql.SQLException

setWasStreamingResults

public void setWasStreamingResults()
Specified by:
setWasStreamingResults in interface StreamingNotifiable