⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
javax.mail

Class MessageContext

java.lang.Object
|
+--javax.mail.MessageContext


public class MessageContext
extends java.lang.Object

The context in which a piece of Message content is contained. A 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.
Author:

Constructor Summary

MessageContext(Part part)

Create a MessageContext object describing the context of the given Part.

Method Summary

Message

getMessage()

Return the Message that contains the content.

Part

getPart()

Return the Part that contains the content.

Session

getSession()

Return the Session we're operating in.

Constructor Details

MessageContext

public MessageContext(Part part)

Create a MessageContext object describing the context of the given Part.

Parameters:
part

Method Details

getMessage

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.


getPart

public Part getPart()

Return the Part that contains the content. May be null.


getSession

public Session getSession()

Return the Session we're operating in.