|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
The Consequence interface responds to notification events.
A Consequence object MUST implement the SyncConverter interface (net.rim.device.api.synchronization.SyncConverter)
Each registered Consequence object is invoked whenever a notification for a new event should commence and terminate. The consequence object can carry out any necessary action for the given conditions. Typically Consequence implementations will notify the user of the event, however, the implementation may, for example, choose to merely log the received event.
Examples of notification events include vibration, tunes and the blinking of LED.
| Field Summary |
| Fields inherited from interface net.rim.device.api.notification.NotificationsConstants |
CALLERID_ADDRESSCARD_UID, CASUAL, CONTINUOUS_REPEAT, CRITICAL, CUSTOM_TUNE_NAME, DEFAULT_LEVEL, FORCE_NO_REPEAT_NOTIFICATIONS_FLAG, FORCED, IMPORTANT, IN_HOLSTER_ENGINE_STATE, MANUAL_TRIGGER, NO_RELATED_SOURCE, NO_SOURCE, NOTIFICATION_LEVEL_KEY, NOTIFICATION_PRIVATE_FLAG_KEY, NOTIFICATION_REPEAT_COUNT, NOTIFICATION_REPEAT_DELAY, OUT_OF_HOLSTER_ENGINE_STATE, OUT_OF_HOLSTER_TRIGGER, SENSITIVE, STOP_CONDITIONS |
| Method Summary | ||
|
Object |
newConfiguration(long consequenceID,
long sourceID,
byte profileIndex,
int level,
Object context)
The framework calls this method to extract a particular cookie object appropriate for the sourceID provided. |
|
void |
startNotification(long consequenceID,
long sourceID,
long eventID,
Object configuration,
Object context)
Invoked when a new event occurs and notification should commence. |
|
void |
stopNotification(long consequenceID,
long sourceID,
long eventID,
Object configuration,
Object context)
Invoked when notification for an event should stop. |
| Method Detail |
public Object newConfiguration(long consequenceID, long sourceID, byte profileIndex, int level, Object context)
This cookie object is later passed back to the consquence object in the start and stop calls.
Implementation Note: Currently, this object MUST implement the SyncObject
AND Persistable interfaces
consequenceID - Identifier of the consequence for which a configuration is needed.sourceID - Identifier of the source object being configured.profileIndex - Index of the profile under which the object is being configured.level - UI interactivity level at which the source object was registered.context - Optional context for the operation.
public void startNotification(long consequenceID,
long sourceID,
long eventID,
Object configuration,
Object context)
conseqeunceID - Identifier of the consequence to trigger (to permit a single object instance to handle multiple consequences)sourceID - Identifier of the source which triggered the notification.eventID - Application-specific event identifier.configuration - Optional configuration object.context - Optional context for the operation.
public void stopNotification(long consequenceID,
long sourceID,
long eventID,
Object configuration,
Object context)
consequenceID - Identifier of the consequence.sourceID - Identifier of the source.eventID - Application-specific event identifier.configuration - Optional configuration object.context - Optional context for the operation.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.