| java.lang.Object java.lang.Thread com.sun.midp.links.Receiver
Receiver | class Receiver extends Thread (Code) | | A thread that receives a message on a given link.
|
Constructor Summary | |
| Receiver(Link newlink, long sleeptime) Constructs a new Receiver that starts a thread that calls receive() on
newlink. | | Receiver(Link newlink) Constructs a new Receiver, providing a default sleep time. |
Method Summary | |
public void | await() Waits until the thread finishes or until a timeout has expired. | public void | completed(LinkMessage msg, Throwable thr) A completion callback. | public void | run() Receives a message and notifies when done, capturing any exceptions. |
TIMEOUT | final public static long TIMEOUT(Code) | | |
Receiver | Receiver(Link newlink, long sleeptime)(Code) | | Constructs a new Receiver that starts a thread that calls receive() on
newlink. After starting the thread, sleeps the indicated number of
milliseconds to give the new thread a chance to run and call receive()
before letting the caller's thread continue.
|
Receiver | Receiver(Link newlink)(Code) | | Constructs a new Receiver, providing a default sleep time.
|
await | public void await()(Code) | | Waits until the thread finishes or until a timeout has expired.
|
completed | public void completed(LinkMessage msg, Throwable thr)(Code) | | A completion callback. Called after the thread returns from the
receive() call. The msg parameter contains the received message, or
null if there was an exception was thrown. The thr parameter contains
any Throwable caught, or null there was none. This is intended to be
overridden by a subclass. The default implementation does nothing.
|
run | public void run()(Code) | | Receives a message and notifies when done, capturing any exceptions.
|
|
|