MessageContext object is returned by the
getMessageContext method of the
MessageAware interface. MessageAware is
typically implemented by DataSources to allow a
DataContentHandler to pass on information about the
context in which a data content object is operating.
javax.mail.MessageAware, javax.activation.DataSource, javax.activation.DataContentHandler
| Access | Constructor and Description |
|---|---|
| public | MessageContext(Part
the Part part)Create a MessageContext object describing the context of the given Part. |
| Modifier and Type | Method and Description |
|---|---|
| public Message | Returns: the containing Message, or null if not knownReturn the Message that contains the content. |
| private static Message | Returns: the containing Message, or null if noneReturn the Message containing an arbitrary Part. |
| public Part | Returns: the containing Part, or null if not knownReturn the Part that contains the content. |
| public Session |
| part | back to summary |
|---|---|
| private Part part | |
| MessageContext | back to summary |
|---|---|
| public MessageContext(Part part) Create a MessageContext object describing the context of the given Part.
| |
| getMessage | back to summary |
|---|---|
| public Message getMessage() Return the Message that contains the content. Follows the parent chain up through containing Multipart objects until it comes to a Message object, or null.
| |
| getMessage | back to summary |
|---|---|
| private static Message getMessage(Part p) throws MessagingException Return the Message containing an arbitrary Part. Follows the parent chain up through containing Multipart objects until it comes to a Message object, or null.
| |
| getPart | back to summary |
|---|---|
| public Part getPart() Return the Part that contains the content.
| |
| getSession | back to summary |
|---|---|
| public Session getSession() Return the Session we're operating in.
| |