| java.lang.Object | |
| ↳ | org.apache.http.impl.conn.tsccm.WaitingThread |
Represents a thread waiting for a connection.
This class implements throwaway objects. It is instantiated whenever
a thread needs to wait. Instances are not re-used, except if the
waiting thread experiences a spurious wakeup and continues to wait.
All methods assume external synchronization on the condition
passed to the constructor.
Instances of this class do
not
synchronize access!
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Creates a new entry for a waiting thread.
|
||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Blocks the calling thread.
|
||||||||||
|
|
Obtains the condition.
|
||||||||||
|
|
Obtains the pool, if there is one.
|
||||||||||
|
|
Obtains the thread, if there is one.
|
||||||||||
|
|
|
||||||||||
|
|
Wakes up the waiting thread.
|
||||||||||
|
[Expand]
Inherited Methods
|
|||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
|||||||||||
Creates a new entry for a waiting thread.
| cond | the condition for which to wait |
|---|---|
| pool |
the pool on which the thread will be waiting,
or
null
|
Blocks the calling thread.
This method returns when the thread is notified or interrupted,
if a timeout occurrs, or if there is a spurious wakeup.
This method assumes external synchronization.
| deadline |
when to time out, or
null
for no timeout
|
|---|
true
if the condition was satisfied,
false
in case of a timeout.
Typically, a call to
wakeup()
is used to indicate
that the condition was satisfied. Since the condition is
accessible outside, this cannot be guaranteed though.
| InterruptedException | if the waiting thread was interrupted |
|---|
Obtains the condition.
null
Obtains the pool, if there is one.
null
Obtains the thread, if there is one.
null
Wakes up the waiting thread.
This method assumes external synchronization.