C H A P T E R  6

Push Delivery

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. The Sun Java System Content Delivery Server supports WAP (Wireless Access Protocol) push, SMS (Short Message Service), and SMTP (Simple Mail Transfer Protocol) push formats for messages, and SMS and MMS push for content.

A push adapter serves as the interface between the Content Delivery Server and your push implementation. Configure the Content Delivery Server to use the push adapters that you need.

The push adapters provided with the 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 adapter using the Messaging API. See the Sun Java System Content Delivery Server Customization Guide for information on this API.


6.1 Push Adapters Provided

The Content Delivery Server provides both push sender and push listener adapters. Push sender adapters are used by the Content Delivery Server to send messages and content to subscribers. Push listener adapters are used by the Content Delivery Server to receive messages initiated by subscribers.

6.1.1 Push Sender Adapters

The Content Delivery Server supports SMS, WAP, and SMTP push formats for messages. Several SMS formats are supported. Delivery of binary content using either MMS or SMS is also supported, but you must write your own adapter for each delivery method that you want to use.

6.1.1.1 SMS Push for Messages

The following forms of SMS push are supported:

When you have your own SMSC, use the following class as your adapter.

com.sun.content.server.server.msgserver.push.SMSPushMsgSender 
 

When you are using HTTP for your SMS services, use the following class as your adapter.

com.sun.content.server.server.msgserver.push.HTTPSMSPushMsgSender
 

If the SMSC that you use requires parameters different than those supported by this adapter, you must write your own adapter using the Messaging API. See the Sun Java System Content Delivery Server Customization Guide for information on this API.

When the SMSC that you use supports the CIMD2 protocol, use the following class as your adapter.

com.sun.content.server.server.msgserver.push.SMSCIMD2PushMsgSender 
 

For each protocol that you support, specify the adapter that you want to use in the pushsenderfactory.xml file as described in Section 6.2, Using a Push Adapter.

6.1.1.2 WAP Push for Messages

This adapter supports push delivery using WAP push. Use the class com.sun.content.server.server.msgserver.push.WAPPushMsgSender as your adapter. Specify this adapter in the pushsenderfactory.xml file as described in Section 6.2, Using a Push Adapter.

If your WAP push proxy gateway (PPG) requires attributes other than what is 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.

6.1.1.3 SMTP Push for Messages

This adapter supports push delivery using SMTP. Use the class com.sun.content.server.server.msgserver.push.SMTPPushMsgSender as your adapter. Specify this adapter in the pushsenderfactory.xml file as described in Section 6.2, Using a Push Adapter.

6.1.1.4 SMS Push for Binary Content

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 6.2, Using a Push Adapter.

6.1.2 Push Listener Adapter

The Content Delivery Server provides push listener adapters for an SMSC that supports CIMD2 or SMPP. To use the CIMD2 adapter, specify the class com.sun.content.server.server.msgserver.protocol.cimd2.CIMD2PushMsgListener in the pushlistenerfactory.xml file as described in Section 6.2, Using a Push Adapter.

To use the SMPP adapter, specify the class com.sun.content.server.server.msgserver.protocol.smpp.SMPPPushMsgListener in the pushlistenerfactory.xml file as described in Section 6.2, Using a Push Adapter.


6.2 Using a Push Adapter

Set up the Content Delivery Server to support the push sender adapter and the push listener adapters that you want to use. To specify the push sender adapters, follow these steps:

1. Register the adapters with the 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 Section 6.3.1, Sample pushsenderfactory.xml for an example of this file.

2. Include the adapter class and any dependent classes in your class path.

3. If you did not do so when you installed the Content Delivery Server, edit the push properties in the MsgServices.properties and CommonMsg.properties files in the $CDS_HOME/deployment/deployment-name/conf directory.

See the Sun Java System Content Delivery Server Installation Guide for additional information.

To specify the push listener adapter that you want to use, follow these steps:

1. Register the adapter with the Content Delivery Server.

To register the adapter, create an XML file named pushlistenerfactory.xml in the $CDS_HOME/deployment/deployment-name/conf directory.

See Section 6.3.2, Sample pushlistenerfactory.xml for an example of this file.

2. Include the adapter class and any dependent classes in your class path.

3. If you did not do so when you installed the Content Delivery Server, edit the push properties in the PushListener.properties and CommonMsg.properties file in the $CDS_HOME/deployment/deployment-name/conf directory.

See the Sun Java System Content Delivery Server Installation Guide for details.


6.3 Sample Registration File

This section includes samples of the pushsenderfactory.xml file and the pushlistenerfactory.xml file. Use these files to register the push adapters that you want to use.

6.3.1 Sample pushsenderfactory.xml

The pushsenderfactory.xml file is used to register the push sender adapters that you choose to use. 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.


CODE EXAMPLE 6-1 Sample pushsenderfactory.xml File
<pushmsgsenderset>
  <pushmsgsender0
    class="com.sun.content.server.server.msgserver.push.TestSMSPushMsgSenderImpl" 
    protocol="sms"/>
  <pushmsgsender1
    class="com.sun.content.server.server.msgserver.push.WAPPushMsgSender"
    protocol="wap"/>
  <pushmsgsender2
    class="com.sun.content.server.server.msgserver.push.SMTPPushMsgSender"
    protocol="smtp"/>
  <pushmsgsender3 
    class="com.sun.content.server.server.msgserver.push.MMSPushMsgSender"
    protocol="mms"/>
</pushmsgsenderset>

6.3.2 Sample pushlistenerfactory.xml

The pushlistenerfactory.xml file is used to register the push listener adapter that you choose to use. The pushmsglistener properties must include the fully qualified name of the push adapter class and the protocol that the adapter supports.

The following sample registers the adapter for CIMD2.


CODE EXAMPLE 6-2 Sample pushlistenerfactory.xml File
<pushmsglistenerset>
  <pushmsglistener0 class="com.sun.content.server.server.msgserver.protocol.cimd2.CIMD2PushMsgListener"
  protocol="sms"/>
</pushmsglistenerset>