|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.notification.NotificationsManager
Manages the handling of events between applications and the notification engine. Keeps track of registered engine listeners as well as known consequence implementors.
| 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 | ||
|
static void |
cancelAllDeferredEvents(long sourceID,
int triggerIndex,
Object context)
Cancels all events matching the source, level and trigger. |
|
static void |
cancelDeferredEvent(long sourceID,
long eventID,
Object eventReference,
int triggerIndex,
Object context)
Cancels the event. |
|
static void |
cancelImmediateEvent(long sourceID,
long eventID,
Object eventReference,
Object context)
Cancels any current immediate events. |
|
static void |
deregisterConsequence(long consequenceID)
Removes the consequence from the list of known consequences. |
|
static void |
deregisterNotificationsEngineListener(long sourceID,
NotificationsEngineListener listener)
Removes the listener from the list of known listeneres. |
|
static void |
deregisterSource(long sourceID)
Removes the application from the list of known event sources. |
|
static int |
getDeferredEventCount(long sourceID)
Returns the count of all events matching the source currently in the queue. |
|
static long[] |
getDeferredEventIds(long sourceID)
Returns the count of all events matching the source currently in the queue. |
|
static Object[] |
getDeferredEvents(long sourceID)
Returns the count of all events matching the source currently in the queue. |
|
static long |
getLastEventDate()
Method returns time stamp when the latest even either immediate or deferred happened |
|
static void |
hideSource(long sourceID)
Hide the application from the list of known event sources. |
|
static boolean |
isHidden(long sourceID)
Returns true if this source is marked as hidden. |
|
static boolean |
isImmediateEventOccuring(long sourceIdLong)
Tests whether a particular event is playing or led blinking for an profile |
|
static void |
moveSource(long srcSourceID,
long destSourceID)
Changes the value of the source identifier specified by srcSourceID to destSourceID. |
|
static void |
negotiateDeferredEvent(long sourceID,
long eventID,
Object eventReference,
long eventDate,
int triggerIndex,
Object context)
Adds the specified event to the event queue. |
|
static void |
registerConsequence(long consequenceID,
Consequence consequence)
Adds a new consequence to the list of known event consequences. |
|
static void |
registerNotificationsEngineListener(long sourceID,
NotificationsEngineListener listener)
Adds a listener to the list of known engine listeners. |
|
static void |
registerSource(long sourceID,
Object source,
int level)
Adds the application to the list of known event sources. |
|
static void |
registerSource(long sourceID,
Object source,
int level,
long relatedSourceID)
Adds the application to the list of known event sources, inheriting defaults from another application. |
|
static void |
triggerImmediateEvent(long sourceID,
long eventID,
Object eventReference,
Object context)
Triggers an immediate event. |
|
static void |
unHideSource(long sourceID)
Reveal a hidden the application from the list of known event sources. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static void cancelAllDeferredEvents(long sourceID,
int triggerIndex,
Object context)
sourceID - Identifier of the application that queued the events.triggerIndex - Identifier of the way in which the events were to be triggered.context - Optional context object.
public static void cancelDeferredEvent(long sourceID,
long eventID,
Object eventReference,
int triggerIndex,
Object context)
sourceID - Identifier of the application that queued the event.eventID - Application-specific event identifier.eventReference - Application-specific event cookie.triggerIndex - Identifier of the way in which the event was to be triggered.context - Optional context object.
public static void cancelImmediateEvent(long sourceID,
long eventID,
Object eventReference,
Object context)
sourceID - Identifier of the application that triggered the event.eventID - Application-specific event identifier.eventReference - Application-specific event cookie.context - Optional context object.public static void deregisterConsequence(long consequenceID)
consequenceID - GUID of the consequence object to deregister.
public static void deregisterNotificationsEngineListener(long sourceID,
NotificationsEngineListener listener)
sourceID - GUID of the listener object to deregister.listener - Listener object.public static void deregisterSource(long sourceID)
sourceID - Identifier of the application to deregister.public static int getDeferredEventCount(long sourceID)
sourceID - GUID of the source object.public static long[] getDeferredEventIds(long sourceID)
sourceID - GUID of the source object.public static Object[] getDeferredEvents(long sourceID)
sourceID - GUID of the source object.public static long getLastEventDate()
public static void hideSource(long sourceID)
sourceID - Identifier of the application to hide.public static boolean isHidden(long sourceID)
public static boolean isImmediateEventOccuring(long sourceIdLong)
public static void moveSource(long srcSourceID,
long destSourceID)
srcSourceID to destSourceID.
If destSourceID is already registered to another source, it will be overwritten by the
source identifier srcSourceID and it will no longer be accessible.srcSourceID - Old Identifier of the source.destSourceID - New Identifier of the source.
public static void negotiateDeferredEvent(long sourceID,
long eventID,
Object eventReference,
long eventDate,
int triggerIndex,
Object context)
Adds the specified event to the event queue. Exactly where in the queue the event is inserted is engine-specific, i.e., neither the event nor the application can decide it.
The triggerIndex parameter specifies further criteria for determining the event. Currently only two values are defined:
If the value MANUAL_TRIGGER is specified as the triggerIndex, the eventDate expiry parameter is ignored.
An event can be cancelled via the cancelDeferredEvent method. Furthermore, this call must be made to cancel an event that has no timeout.
sourceID - Identifier of the application that is queuing the event.eventID - Application-specific event identifier.eventReference - Application-specific event cookie.eventDate - Event expiry time in absolute time in ms. This parameter is currently ignored
UNLESS the triggerIndex is NotificationsConstants.OUT_OF_HOLSTER_TRIGGERtriggerIndex - Identifier of the way in which the event will be triggered.context - Optional context object.
public static void registerConsequence(long consequenceID,
Consequence consequence)
consequenceID - GUID of the consequence object to register.consequence - Consequence object itself.
public static void registerNotificationsEngineListener(long sourceID,
NotificationsEngineListener listener)
sourceID - GUID of the listener object to register.listener - Listener object.
public static void registerSource(long sourceID,
Object source,
int level)
sourceID - Identifier of the application to register.source - Source application object.level - Level at which the application is to be registered.
public static void registerSource(long sourceID,
Object source,
int level,
long relatedSourceID)
sourceID - Identifier of the application to register.source - Source application object.level - Level at which the application is to be registered.relatedSourceID - Identifier of the application that this source will inherit fromNullPointerException - if source is null.
public static void triggerImmediateEvent(long sourceID,
long eventID,
Object eventReference,
Object context)
sourceID - Identifier of the application triggering the event.eventID - Application-specific event identifier.eventReference - Application-specific event cookie.categoryId - context - Optional context object.public static void unHideSource(long sourceID)
sourceID - Identifier of the application to un hide.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2008 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.