|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface MessageListener
Defines the basic behavior that a class should implement to receive messages. Beware that any UI updates you want
to perform should be called using the invokeLater method because the MessageListener does not
run in the main event thread.
Also note that applications are allocated a limited number of threads by the platform;
if you perform blocking operations that run for a long time in your MessageListener, you may delay delivery
of other outstanding messages to your application.
| Method Summary | ||
|---|---|---|
void |
onMessage(Destination destination,
Message message)
Called when a message is received. |
|
void |
onMessageCancelled(Destination destination,
int cancelledMessageId)
Called if a message is cancelled before delivery. |
|
void |
onMessageFailed(Destination destination,
MessageFailureException exception)
Called if message delivery fails due to HTTP errors, network failure, and invalid URL, and so on. |
|
| Method Detail |
|---|
void onMessage(Destination destination,
Message message)
destination - The Destination associated with the message received.message - The message received.
void onMessageFailed(Destination destination,
MessageFailureException exception)
destination - The Destination associated with the exception.exception - Details about the message delivery failure, including a failure response Message if one was
provided.
void onMessageCancelled(Destination destination,
int cancelledMessageId)
setCancellable
method.
destination - The Destination of the cancelled message.cancelledMessageId - The ID of the cancelled message.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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