Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.squawk.io.mailboxes
Class Envelope

    java.lang.Object
      com.sun.squawk.io.mailboxes.Envelope

Direct Known Subclasses:
  ByteArrayEnvelope, ByteArrayInputStreamEnvelope, ObjectEnvelope

    public abstract class Envelope

extends Object

Abstract class for messages passed through Channels.

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.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Envelope

    public Envelope()

Method Detail

### getContents

    public abstract Object getContents()

  Return the contents of the envelope. This should only be called by the receiver of the envelope. All implementations should call checkCallContext.

  Returns:
    the contents of the envelope
  Throws:
    `IllegalStateException` - if called before the envelopesent, or called by the sender.

### checkCallContext

    protected void checkCallContext()
                             throws IllegalStateException

  Check that this envelope has been sent, and that the caller's isolate is the receiver of the envelope. This should be called by all implementations of getContents().

  Throws:
    `IllegalStateException` - if the conditions are not met.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"