|
AeroGear Android Library 1.2.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.aerogear.android.unifiedpush.Registrations
public class Registrations
This is the factory and accessors for PushRegistrars
| Constructor Summary | |
|---|---|
Registrations()
|
|
Registrations(PushRegistrarFactory factory)
|
|
| Method Summary | |
|---|---|
PushRegistrar |
get(String name)
Recalls a PushRegister instance which was created with push(java.lang.String, org.jboss.aerogear.android.unifiedpush.PushConfig). |
protected static void |
notifyHandlers(android.content.Context context,
android.content.Intent message)
This will deliver an intent to all registered handlers. |
static void |
notifyHandlers(android.content.Context context,
android.content.Intent message,
MessageHandler defaultHandler)
This will deliver an intent to all registered handlers. |
PushRegistrar |
push(String name,
PushConfig config)
This method will try to build a PuserRegistrar based on the values in the configuration bean. |
static void |
registerBackgroundThreadHandler(MessageHandler handler)
When a push message is received, all background thread handlers will be notified on a non UI thread. |
static void |
registerMainThreadHandler(MessageHandler handler)
When a push message is received, all main thread handlers will be notified on the main(UI) thread. |
static void |
unregisterBackgroundThreadHandler(MessageHandler handler)
This will remove the given handler from the collection of background thread handlers. |
static void |
unregisterMainThreadHandler(MessageHandler handler)
This will remove the given handler from the collection of main thread handlers. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Registrations()
public Registrations(PushRegistrarFactory factory)
| Method Detail |
|---|
public PushRegistrar push(String name,
PushConfig config)
get(java.lang.String)
and passing in the name parameter.
name - the name which will be used to look up the registrar laterconfig - a configuration bean.
IllegalArgumentException - is config.type is not a supported typepublic PushRegistrar get(String name)
push(java.lang.String, org.jboss.aerogear.android.unifiedpush.PushConfig).
name - the name parameter to look up
public static void registerMainThreadHandler(MessageHandler handler)
handler - a handler to added to the list of handlers to be notified.public static void registerBackgroundThreadHandler(MessageHandler handler)
handler - a handler to added to the list of handlers to be notified.public static void unregisterMainThreadHandler(MessageHandler handler)
handler - public static void unregisterBackgroundThreadHandler(MessageHandler handler)
handler -
public static void notifyHandlers(android.content.Context context,
android.content.Intent message,
MessageHandler defaultHandler)
PushConstants for information on how messages will be routed.
context - the application's contextmessage - the message to passdefaultHandler - a default handler is a handler which will be called
if there are no other handlers registered. May be null
protected static void notifyHandlers(android.content.Context context,
android.content.Intent message)
context - the application's contextmessage - the message to pass
|
AeroGear Android Library 1.2.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||