public class

GcmConnector

extends Object
implements MuleContextAware
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

Constants
String GCM_SEND_URI
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 Constructors
GcmConnector()
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
From interface org.mule.api.context.MuleContextAware

Constants

public static final String GCM_SEND_URI

Constant Value: "https://android.googleapis.com/gcm/send"

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 Constructors

public GcmConnector ()

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.
Returns
Throws
Exception thrown in case anything goes wrong when sending the message.

public void setApiKey (String apiKey)

Parameters
apiKey

public void setConnector (Connector connector)

Parameters
connector

public void setMuleContext (MuleContext muleContext)

Parameters
muleContext