|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.squawk.io.mailboxes.Envelope
public abstract class Envelope
Abstract class for messages passed to MailBoxes. An envelope contains both contents as well as MailBoxAddress of the mail box that the message was sent to and the MailBoxAddress that should be used for replies. The system defines several kinds of envelopes, including ObjectEnvelopes and ByteArrayEnvelopes. Note that the conntents of the envelope should only be looked at by the receiver, or inter-isolate pointers could be created. The getContents() method enforces this.
| Constructor Summary | |
|---|---|
Envelope()
|
|
| Method Summary | |
|---|---|
protected void |
checkCallContext()
Check that this envelope has been sent, and that the caller's isolate is the receiver of the envelope. |
abstract Object |
getContents()
Return the contents of the envelope. |
MailboxAddress |
getReplyAddress()
Returns the MailBoxAddress to be used for any replies. |
MailboxAddress |
getToAddress()
Returns the MailBoxAddress that the envelope was sent to. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Envelope()
| Method Detail |
|---|
public MailboxAddress getToAddress()
public MailboxAddress getReplyAddress()
public abstract Object getContents()
IllegalStateException - if called before the envelopesent, or called by the sender.
protected void checkCallContext()
throws IllegalStateException
IllegalStateException - if the conditions are not met.
|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||