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:
java.io.Serializable
Direct Known Subclasses:
ConnectionFeatureNotAvailableException

public class CommunicationsException
extends java.sql.SQLException

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(Connection conn, long lastPacketSentTimeMs, java.lang.Exception underlyingException)
           
 
Method Summary
 java.lang.String getMessage()
           
 java.lang.String getSQLState()
           
protected  void setWasStreamingResults()
           
 
Methods inherited from class java.sql.SQLException
getErrorCode, getNextException, 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(Connection conn,
                               long lastPacketSentTimeMs,
                               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

protected void setWasStreamingResults()