public class RegistrarManager extends Object
| Constructor and Description |
|---|
RegistrarManager() |
| Modifier and Type | Method and Description |
|---|---|
static <CFG extends PushConfiguration<CFG>> |
config(String name,
Class<CFG> pushConfigurationClass)
Begins a new fluent configuration stanza.
|
static PushRegistrar |
getRegistrar(String name)
Fetches a named registrar
|
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.
|
static void |
registerBackgroundThreadHandler(MessageHandler handler)
When a push message is received, all background thread handlers will be
notified on a non UI thread.
|
static <CFG extends PushConfiguration<CFG>> |
registerConfigurationProvider(Class<CFG> configurationClass,
org.jboss.aerogear.android.core.ConfigurationProvider<CFG> provider)
This will add a new Configuration that this Manager can build
Configurations for.
|
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.
|
public static <CFG extends PushConfiguration<CFG>> void registerConfigurationProvider(Class<CFG> configurationClass, org.jboss.aerogear.android.core.ConfigurationProvider<CFG> provider)
CFG - the actual Configuration typeconfigurationClass - the class of configuration to be registeredprovider - the instance which will provide the configuration.public static <CFG extends PushConfiguration<CFG>> CFG config(String name, Class<CFG> pushConfigurationClass)
CFG - the Configuration type.name - an identifier which will be used to fetch the
PushRegistrar after configuration is finished.pushConfigurationClass - the class of the configuration
type.PushConfiguration which can be used to build a
AuthenticationModule object.public static PushRegistrar getRegistrar(String name)
name - the name of the PushRegistrar given in config(java.lang.String, java.lang.Class)PushRegistrar or nullpublic 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 - a new handlerpublic static void unregisterBackgroundThreadHandler(MessageHandler handler)
handler - a new handlerpublic 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 nullprotected static void notifyHandlers(android.content.Context context,
android.content.Intent message)
context - the application's contextmessage - the message to passCopyright © 2015 JBoss by Red Hat. All rights reserved.