org.mule.modules

mule-module-google-cloud-messaging

config

Namespacehttp://www.mulesoft.org/schema/mule/gcm
Schema Locationhttp://www.mulesoft.org/schema/mule/gcm/current/mule-gcm.xsd  (View Schema)
Schema Version1.0
Minimum Mule Version3.4

Module Overview

Mule connector for Google Cloud Messaging (GCM / CCS).

XML Sample
INCLUDE_ERROR

Summary

Configuration
<gcm:config>
Configure an instance of this module
Message Processors
<gcm:send-message>
Send a message using the HTTP API.

Configuration

To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:

<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:gcm="http://www.mulesoft.org/schema/mule/gcm"
      xsi:schemaLocation="
               http://www.mulesoft.org/schema/mule/core
               http://www.mulesoft.org/schema/mule/core/current/mule.xsd
               http://www.mulesoft.org/schema/mule/gcm
               http://www.mulesoft.org/schema/mule/gcm/current/mule-gcm.xsd">

      <!-- here goes your flows and configuration elements -->

</mule>

This module is configured using the config element. This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necessary as long as each carries its own name.

Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to specify which configuration to use.

Attributes
TypeNameDefault ValueDescriptionJava TypeMIME TypeEncoding
xs:string name Optional. Give a name to this configuration so it can be later referenced.
xs:string apiKey The Google APIs key.
connector Optional. The connector to use to reach Neo4j: configure only if there is more than one HTTP/HTTPS connector active in your Mule application.

Message Processors

<gcm:send-message>

Send a message using the HTTP API.

XML Sample
INCLUDE_ERROR

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
notificationKey Optional. A string that maps a single user to multiple registration IDs associated with that user. String */* UTF-8
notificationKeyName Optional. A name or identifier that is unique to a given user. String */* UTF-8
collapseKey Optional. 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. String */* UTF-8
delayWhileIdle false Optional. Indicates that the message should not be sent immediately if the device is idle. boolean */*
timeToLiveSeconds 2419200 Optional. How long (in seconds) the message should be kept on GCM storage if the device is offline. int */*
restrictedPackageName Optional. A string containing the package name of your application. String */* UTF-8
dryRun false Optional. Allows developers to test their request without actually sending a message. boolean */*
muleEvent The MuleEvent being processed. MuleEvent */*
Child Elements
NameDefault ValueDescriptionJava Type
<gcm:registration-ids> The list of devices (registration IDs) receiving the message. List<String>
<gcm:data> Optional. The key-value pairs of the message's payload data. Map<String, Object>
Returns
Return Type Description
GcmResponse a GcmResponse instance.
Exception Payloads
Payload ClassDescription
Exception thrown in case anything goes wrong when sending the message.

Message Sources

Transformers