net.rim.blackberry.api.mail.event
Class MessageEvent

java.lang.Object
  extended by net.rim.blackberry.api.mail.event.MailEvent
      extended by net.rim.blackberry.api.mail.event.MessageEvent

public class MessageEvent
extends MailEvent

Indicates that a message has changed.

The system produces a message event when a message's header attributes (envelope) is updated, or when a message is opened, closed, created, forwarded or replied to in the device's Message application.

Note: It is not possible to intercept a message during transmission. Changes to the Message object indicated by this message event do not change data that has already been sent from the handheld. Changes are reflected in the message in the messages list, however, and the updated message can be retransmitted.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

Field Summary
Category: Signed static int CLOSED
          Message was closed in the main message list UI.
Category: Signed static int FORWARD
          Message is forwarded.
Category: Signed static int NEW
          The compose screen is opened to create a new message.
Category: Signed static int OPENED
          Message was opened in the main message list UI.
Category: Signed static int REPLY
          Reply to a message.
Category: Signed static int UPDATED
          Message header attributes (envelope) changed, but not the message body.
 
Constructor Summary
Category: Signed MessageEvent(int type, Message msg)
          Creates a new MessageEvent instance.
 
Method Summary
Category: Signed  void dispatch(Object listener)
          Dispatches this event to provided listener.
Category: Signed  Message getMessage()
          Returns the changed message.
Category: Signed  int getMessageChangeType()
          Retrieves this event's type.
Category: Signed  String toString()
          Converts this event into a string.
 
Methods inherited from class net.rim.blackberry.api.mail.event.MailEvent
getSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 



Field Detail

UPDATED

public static final int UPDATED
Message header attributes (envelope) changed, but not the message body.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

OPENED

public static final int OPENED
Message was opened in the main message list UI.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

CLOSED

public static final int CLOSED
Message was closed in the main message list UI.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

NEW

public static final int NEW
The compose screen is opened to create a new message.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.1.0

FORWARD

public static final int FORWARD
Message is forwarded.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.1.0

REPLY

public static final int REPLY
Reply to a message.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.1.0


Constructor Detail

MessageEvent

public MessageEvent(int type,
                    Message msg)
Creates a new MessageEvent instance.

Parameters:
type - Type of this event: MessageEvent.UPDATED, MessageEvent.OPENED, MessageEvent.CLOSED, MessageEvent.NEW, MessageEvent.FORWARD, or MessageEvent.REPLY.
msg - Message associated with the event.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0


Method Detail

dispatch

public void dispatch(Object listener)
Dispatches this event to provided listener.

Specified by:
dispatch in class MailEvent
Parameters:
listener - Listener to handle this event.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

getMessage

public Message getMessage()
Returns the changed message.

Returns:
Message that was changed by this event.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

getMessageChangeType

public int getMessageChangeType()
Retrieves this event's type.

Returns:
Type of message event: MessageEvent.UPDATED, MessageEvent.OPENED, MessageEvent.CLOSED, MessageEvent.NEW, MessageEvent.FORWARD, or MessageEvent.REPLY.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

toString

public String toString()
Converts this event into a string.

Overrides:
toString in class MailEvent
Returns:
String form for this event.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal