|
SunSPOT API V2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.squawk.io.mailboxes.Channel
public class Channel
A Channel is a private bidirectional link between two MailBoxes. The Channel is a wrapper over the local mailbox and the mailboxaddress of the remote mailbox.
A Channel can be used to talk to any kind of registered Mailbox, including those created by ServerChannels, and those created by the raw Mailbox API.
ServerChannel| Method Summary | |
|---|---|
void |
close()
Closes the Channel at both ends asynchronously. |
boolean |
isOpen()
Return true if the channel is open, both from here to the remote mailbox, and from the remote mailbox back. |
static Channel |
lookup(String mailboxName)
Create a private MailBox, and connect to the named MailBox. |
Envelope |
receive()
Wait for an envlope sent to this channel. |
void |
send(Envelope env)
Sends a message to the remote Mailbox. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void close()
public boolean isOpen()
public static Channel lookup(String mailboxName)
throws NoSuchMailboxException
NoSuchMailboxException
public Envelope receive()
throws AddressClosedException,
MailboxClosedException
AddressClosedException - if the connection to this mailbox is closed.
MailboxClosedException - if the Channel itself is closed.
public void send(Envelope env)
throws AddressClosedException
env - the message to send
IllegateStateException - if the address is not in the open state.
AddressClosedException
|
SunSPOT API V2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||