C H A P T E R 8 |
Outgoing Push Messages |
Push technology makes it possible for subscribers to receive the link to content without first having to request it from their device. Push technology can also be used to push content directly to a device. Sun Java System Content Delivery Server supports WAP push, SMS, and SMTP push formats for messages, and SMS and MMS push for content.
The Messaging Service pushes messages and content to subscribers. A push sender adapter serves as the interface between Content Delivery Server and your push implementation for delivering messages and content. Configure the Messaging Service to use the push sender adapters that you need.
The push sender adapters provided with Content Delivery Server are described in the following sections. If these adapters do not provide the functionality that you need, you can create your own push sender adapter using the Messaging API. See the Sun Java System Content Delivery Server Customization Guide for information on this API.
This chapter contains the following topics:
Content Delivery Server provides adapters for SMS, WAP, and SMTP push formats for messages. Several SMS formats are supported.
Delivery of binary content using either MMS or SMS is supported, but you must write your own adapter for each delivery method that you want to use.
Content Delivery Server supports the following SMS push protocols: Short Message Peer-to-Peer (SMPP) version 3.4, SMS HTTP, and Computer Interface to Message Distribution (CIMD2). Configure the Messaging Service for the protocol that you use.
1. Install the SMPP API library version 0.3.7 on the server on which the Messaging Service is running.
This library is available from SourceForge.net.
a. Download the file http://downloads.sourceforge.net/smppapi/smppapi-0.3.7.tar.gz.
Save this file in a temporary location.
b. Extract the file smppapi-0.3.7/lib/smppapi-0.3.7.jar from the file just downloaded.
c. Copy the smppapi-0.3.7.jar file to the $CDS_HOME/deployment/deployment-name/lib/external directory.
d. If you are using the Sun Java System Application Server, add $CDS_HOME/deployment/deployment-name/lib/external/smppapi-0.3.7.jar to the CLASSPATH using one of the following methods:
2. Open the MsgService.properties file.
This file is in the $CDS_HOME/deployment/deployment-name/conf directory.
3. Set the SMS properties as needed for your environment.
The following code shows the properties for a sample SMPP Push adapter.
smsc.hostname = 127.0.0.1 smsc.port = 11111 esme.system_id=user1 esme.password = usrpw esme.system_type = esme.destination= smsc.gsm.ton = 2 smsc.gsm.npi = 0 |
4. Set the push sender properties as needed for your environment.
The following code shows the properties for a sample SMPP Push adapter.
5. (Optional) Set the properties used to categorize the outgoing message from the server.
The SMSC can use these properties for billing or for other purposes. If a value is not set for a service type, the value of the default.service_type property is used.
6. Save your changes to the MsgService.properties file.
7. Register your adapter in the pushsenderfactory.xml file.
When you have your own SMSC, specify the following class as your adapter in the pushsenderfactory.xml file as described in Section 8.2, Using a Push Adapter.
1. Open the MsgService.properties file.
This file is in the $CDS_HOME/deployment/deployment-name/conf directory.
2. Set the SMS properties as needed for your environment.
The following code shows the properties for a sample SMS HTTP Push adapter.
# SMS HTTP properties cds.sms.http.serverurl= cds.sms.http.user= cds.sms.http.password= cds.sms.http.from=CDS |
The following properties specify the names of the HTTP parameters to be passed in the SMS message.
cds.sms.attribname.userid cds.sms.attribname.password cds.sms.attribname.from cds.sms.attribname.msg cds.sms.attribname.to |
For example, if the SMSC uses the HTTP parameter smsfrom to identify where the message is from, set cds.sms.attribname.from to smsfrom. The values must not be null or blank.
3. Save your changes to the MsgService.properties file.
4. Register your adapter in the pushsenderfactory.xml file.
When you are using HTTP for your SMS services, specify the following class as your adapter in the pushsenderfactory.xml file as described in Section 8.2, Using a Push Adapter.
1. Open the MsgService.properties file.
This file is in the $CDS_HOME/deployment/deployment-name/conf directory.
2. Set the SMS properties as needed for your environment.
The following code shows the properties for a sample CIMD2 Push adapter.
3. Save your changes to the MsgService.properties file.
4. Register your adapter in the pushsenderfactory.xml file.
When the SMSC that you use supports the CIMD2 protocol, specify the following class as your adapter in the pushsenderfactory.xml file as described in Section 8.2, Using a Push Adapter.
This adapter supports push delivery using WAP push. To configure the Messaging Service for WAP Push support, follow these steps:
1. Open the MsgService.properties file.
This file is in the $CDS_HOME/deployment/deployment-name/conf directory.
2. Set the WAP and PPG properties as needed for your environment, for example:
3. Save your changes to the MsgService.properties file.
4. Register your adapter in the pushsenderfactory.xml file.
Use the class com.sun.content.server.messagingservice.msgserver.push.WAPPushMsgSender as your adapter. Specify this adapter in the pushsenderfactory.xml file as described in Section 8.2, Using a Push Adapter.
5. If your WAP push proxy gateway (PPG) requires attributes other than those currently included in the message template, you must update the wap_push_msg_template.xsl file.
This file is in the $CDS_HOME/deployment/deployment-name/conf directory.
This adapter supports push delivery using SMTP. Use the class com.sun.content.server.messagingservice.msgserver.push.SMTPPushMsgSender as your adapter. Specify this adapter in the pushsenderfactory.xml file as described in Section 8.2, Using a Push Adapter.
If you want to push binary content to devices, you must create your own adapter using the Messaging API. Use the push category to determine whether binary content or a message is sent. The constant PUSH_CONTENT_BINARY_CATEGORY defined in the PushConstants class identifies messages that contain binary content. See the Sun Java System Content Delivery Server Customization Guide for information on the Messaging API and the PushConstants class.
If you write your own adapter, specify this adapter in the pushsenderfactory.xml file as described in Section 8.2, Using a Push Adapter.
The pushsenderfactory.xml file is used to register push sender adapters. As shown in the following code example, the pushmsgsender properties must include the fully qualified name of the push adapter class and the protocol that the adapter supports.
The following sample registers an adapter for each type of push sender supported.
To specify the push sender adapters that you want to use, follow these steps:
1. Register the adapters with Content Delivery Server.
To register the adapters, create an XML file named pushsenderfactory.xml in the $CDS_HOME/deployment/deployment-name/conf directory. Only one SMS push adapter can be specified.
See CODE EXAMPLE 8-1 for an example of this file.
2. Include the adapter class and any dependent classes in your classpath.
3. Save the pushsenderfactory.xml file.
The default SMS push message contains a message from Content Delivery Server and the URL for the content to be downloaded, for example:
If the length of the message sent causes a problem, you can limit this message to just the message from Content Delivery Server or just the URL. Edit the template sms_push_msg_template.xsl found in the $CDS_HOME/deployment/deployment-name/conf directory.
The following code shows a sample template.
To limit the message to just the message from Content Delivery Server, remove line 7. To limit the message to just the URL, remove line 6.
To have Content Delivery Server deliver content by MMS, you must configure the MMS messaging properties in the VSAdminConsole.properties, SubscriberPortal.properties, and MsgService.properties files. The Multimedia Message Service Center (MMSC) processes the MMS message based on the values that you enter for the properties. The MMS messaging properties and their values are described in TABLE 8-1.
1. Edit the VSAdminConsole.properties and the SubscriberPortal.properties files.
These files are in the $CDS_HOME/deployment/deployment-name/conf directory.
2. Set the following MMS messaging properties in each of the two files, so that the values match.
The following code shows sample settings for MMS support.
3. Set the following additional property in the SubscriberPortal.properties file, for example:
mms.fallback.pushtype=sms
Note that the service that you specify must also be configured for Content Delivery Server. For more information on configuring SMS or WAP, see Chapter 10.
4. Edit the MsgService.properties file.
This file is in the $CDS_HOME/deployment/deployment-name/conf directory.
5. Set the full class name for the MMS sender class, for example:
The following table describes the properties for MMS messages.
Identifies an alternate mechanism to push the message if MMS is not used. The following values are valid: The alternate mechanism must be configured for Content Delivery Server. See Chapter 10 for more information. |
|
Provides the MMSC with categories for the messages. The following values are valid: |
|
Indicates if a delivery report is expected from the subscriber’s device. The following values are valid: |
|
Provides the MMSC with priority levels for messages. The following values are valid: |
|
Indicates if a message indicating that the message has been read is expected from the subscriber’s device. The following values are valid: |
|
Indicates if the name of the message sender is displayed or hidden. The following values are valid: |
|
The full name of the class that implements the MMSSender class. The MMSSender class can be found in the cdsapi module. |
|
The name of the XSL template that is used to create the Synchronized Multimedia Integration Language (SMIL) data. The value of this property is expressed as the name of the template file and its path, relative to the conf directory. |
Copyright © 2008, Sun Microsystems, Inc. All Rights Reserved.