|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Consequence
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, FORCED, FORCE_NO_REPEAT_NOTIFICATIONS_FLAG, IGNORE_SENSOR_UPDATES, IMPORTANT, IN_HOLSTER_ENGINE_STATE, MANUAL_TRIGGER, NOTIFICATION_LEVEL_KEY, NOTIFICATION_PRIVATE_FLAG_KEY, NOTIFICATION_REPEAT_COUNT, NOTIFICATION_REPEAT_DELAY, NO_RELATED_SOURCE, NO_SOURCE, 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 |
---|
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.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.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.
|
|||||||||
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