Class QThreadAffinityException

  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.trolltech.qt.QThreadAffinityException
All Implemented Interfaces:

public class QThreadAffinityException
extends java.lang.RuntimeException

The QThreadAffinityException class is thrown when a QObject is used outside its own thread. Each QObject has thread affinity, a thread that it belongs to, which is accessible through its thread() method. Accessing an object from outside this thread is forbidden to avoid concurrency problems. Qt Jambi checks if threading affinity is violated in each member of each QObject subclass. It is possible to disable this check by setting the VM runtime parameter com.trolltech.qt.thread-check to false.

See Also:
Serialized Form

Constructor Summary
QThreadAffinityException(java.lang.String message, QObject object, java.lang.Thread thread)
          Creates a new QThreadAffinityException with the given message, object and thread.
Method Summary
 java.lang.String toString()
          Returns a string representation of this exception.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public QThreadAffinityException(java.lang.String message,
                                QObject object,
                                java.lang.Thread thread)
Creates a new QThreadAffinityException with the given message, object and thread.

message - Describes the affinity exception.
object - The object that was accessed.
thread - The thread from which the access was made.
Method Detail


public java.lang.String toString()
Returns a string representation of this exception.

toString in class java.lang.Throwable
This exception as a string.