Object.notify
Class Overview | Class Members |
This Package |
All Packages
public final native void notify()
Description
Wakes up a single thread that is waiting on this object's
monitor. A thread waits on an object's monitor by calling one of
the wait methods.
This method should only be called by a thread that is the owner
of this object's monitor. A thread becomes the owner of the
object's monitor in one of three ways:
- By executing a synchronized instance method of that object.
- By executing the body of a synchronized statement
that synchronizes on the object.
- For objects of type Class, by executing a
synchronized static method of that class.
Only one thread at a time can own an object's monitor.
Exceptions
IllegalMonitorStateException
if the current thread is not
the owner of this object's monitor.
See Also
notifyAll, wait