javax.mail
Class MessageContext

java.lang.Object
  extended by javax.mail.MessageContext

public class MessageContext
extends Object

The context in which a piece of message content is contained.

Version:
$Rev: 578802 $ $Date: 2007-09-24 09:16:44 -0400 (Mon, 24 Sep 2007) $

Constructor Summary
MessageContext(Part part)
          Create a MessageContext object describing the context of the supplied Part.
 
Method Summary
 Message getMessage()
          Return the message that contains the content; if the Part is a Multipart then recurse up the chain until a Message is found.
 Part getPart()
          Return the Part that contains the content.
 Session getSession()
          Return the session associated with the Message containing this Part.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageContext

public MessageContext(Part part)
Create a MessageContext object describing the context of the supplied Part.

Parameters:
part - the containing part
Method Detail

getPart

public Part getPart()
Return the Part that contains the content.

Returns:
the part

getMessage

public Message getMessage()
Return the message that contains the content; if the Part is a Multipart then recurse up the chain until a Message is found.

Returns:

getSession

public Session getSession()
Return the session associated with the Message containing this Part.

Returns:
the session associated with this context's root message


Copyright © 2003-2008 The Apache Software Foundation. All Rights Reserved.