| java.lang.Object |
| ↳ |
org.mule.module.gcm.GcmConnector |
Known Direct Subclasses
|
Known Indirect Subclasses
|
Class Overview
Mule connector for Google Cloud Messaging (GCM / CCS).
Summary
| Fields |
|
private
static
final
ObjectMapper |
OBJECT_MAPPER |
|
|
private
String |
apiKey |
The Google APIs key. |
|
private
Connector |
connector |
The connector to use to reach Neo4j: configure only if there is more than one HTTP/HTTPS
connector active in your Mule application. |
|
private
MuleContext |
muleContext |
|
| Public Methods |
|
String
|
getApiKey()
|
|
Connector
|
getConnector()
|
|
GcmResponse
|
sendMessage(List<String> registrationIds, String notificationKey, String notificationKeyName, String collapseKey, Map<String, Object> data, boolean delayWhileIdle, int timeToLiveSeconds, String restrictedPackageName, boolean dryRun, MuleEvent muleEvent)
Send a message using the HTTP API.
|
|
void
|
setApiKey(String apiKey)
|
|
void
|
setConnector(Connector connector)
|
|
void
|
setMuleContext(MuleContext muleContext)
|
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
From interface
org.mule.api.context.MuleContextAware
|
abstract
void
|
setMuleContext(MuleContext arg0)
|
|
Constants
public
static
final
String
GCM_SEND_URI
Constant Value:
"https://android.googleapis.com/gcm/send"
Fields
private
static
final
ObjectMapper
OBJECT_MAPPER
private
Connector
connector
The connector to use to reach Neo4j: configure only if there is more than one HTTP/HTTPS
connector active in your Mule application.
private
MuleContext
muleContext
Public Constructors
Public Methods
public
String
getApiKey
()
public
Connector
getConnector
()
public
GcmResponse
sendMessage
(List<String> registrationIds, String notificationKey, String notificationKeyName, String collapseKey, Map<String, Object> data, boolean delayWhileIdle, int timeToLiveSeconds, String restrictedPackageName, boolean dryRun, MuleEvent muleEvent)
Send a message using the HTTP API.
Parameters
| registrationIds
| The list of devices (registration IDs) receiving the message. |
| notificationKey
| A string that maps a single user to multiple registration IDs
associated with that user. |
| notificationKeyName
| A name or identifier that is unique to a given user. |
| collapseKey
| An arbitrary string that is used to collapse a group of like messages when
the device is offline, so that only the last message gets sent to the client. |
| data
| The key-value pairs of the message's payload data. |
| delayWhileIdle
| Indicates that the message should not be sent immediately if the device
is idle. |
| timeToLiveSeconds
| How long (in seconds) the message should be kept on GCM storage if
the device is offline. |
| restrictedPackageName
| A string containing the package name of your application. |
| dryRun
| Allows developers to test their request without actually sending a message. |
| muleEvent
| The MuleEvent being processed. |
Throws
| Exception
| thrown in case anything goes wrong when sending the message.
|
public
void
setApiKey
(String apiKey)
public
void
setConnector
(Connector connector)
public
void
setMuleContext
(MuleContext muleContext)