|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.blackberry.api.push.PushApplicationRegistry
public class PushApplicationRegistry
Provides mechanism to register push applications.
Method Summary | ||
---|---|---|
static PushApplicationStatus |
getStatus(PushApplicationDescriptor pad)
Returns current registration status. |
|
static void |
registerApplication(PushApplicationDescriptor pad)
Registers given client-side push application for incoming push messages. |
|
static void |
unregisterApplication()
Unregisters a client-side push application. |
|
static void |
unregisterApplication(PushApplicationDescriptor pad)
Unregisters a client-side push application from the specified port. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void registerApplication(PushApplicationDescriptor pad) throws IllegalArgumentException
PushApplication#onStatusChange()
callback method.
The PushApplicationDescriptor argument contains optional parameter ApplicationDescriptor
which defines application
startup arguments passed into the static void main(String[] args)
method. MIDlet application can not specify
main method arguments through ApplicationDescriptor because it is started differently.
If the ApplicationDescriptor is specified the corresponding client-side push application will be started to verify that it
implements the PushApplication
interface. It will remain running in the background until the registration is
finished which means that PushApplication.onStatusChange(PushApplicationStatus)
method will be called. The
application should exit to save system resources if push messages are expected to be rare.
Application specified by descriptor should belong to the same application group with the current application, otherwise,
IllegalArgumentException
would be thrown.
pad
- pad defines client-side push application descriptor properties
IllegalArgumentException
public static void unregisterApplication()
PushApplicationRegistry.registerApplication(PushApplicationDescriptor)
method.
If the application is listening on multiple ports then it will be unregistered from all the ports. Refer to
PushApplicationRegistry.unregisterApplication(PushApplicationDescriptor)
method to unregister from a specific port. If application is not registered with push
registry then no exception is thrown.
public static void unregisterApplication(PushApplicationDescriptor pad) throws IllegalArgumentException
PushApplicationRegistry.registerApplication(PushApplicationDescriptor)
method
IllegalArgumentException
- if application is not listening on the specified portpublic static PushApplicationStatus getStatus(PushApplicationDescriptor pad)
PushApplicationStatus
for status constants.
The method returns client side status only while server may have a different value.
pad
- optional push application descriptor specifying
application properties
|
|||||||||
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