com.objectxp.mms.protocol
Interface MM7Service

All Superinterfaces:
MMSService

public interface MM7Service
extends MMSService

This class implements the MM7 Protocol according to the 3GPP TS 23.140 specification.

MM7 is the protocol between the Multimedia Service Center (MMSC) and a Value Added Service Provider (VASP). It is based on SOAP and uses HTTP(S) as the transport protocol. It can be used by third-party applications to send and receive multimedia messages to/from MMS-capable mobile devices.

Outgoing messages will be submitted from your system to the MM7 MMS center using a HTTP(S) POST request. For incoming messages, the MM7 MMSC will submit a HTTP(S) POST request to your machine.

Operation Modes

jSMS supports two modes for MM7 message reception: standalone and Web-Application.

In standalone mode, jSMS uses an embedded HTTP server (Jetty) for processing incoming MM7 HTTP requests. To turn on reception, you must call the connect() method. To stop reception, invoke disconnect().

In Web-Application mode, jSMS relies on the HTTP functionality provided by a Web Application Server. You must therefore write a servlet extending MM7ReceiverServlet and install this servlet into your webapp server.

Please notice that MM7 requires Java 1.4.2 or later. The MM7 implementation depends on the JavaMail API (V1.4). You will also need the JavaBeans Activation Framework (JAF - V1.1). The jSMS distribution already contains the JavaMail (lib/javamail.jar) and JAF (lib/activation.jar) libraries. Those libraries must be added to your CLASSPATH. *

Capabilities of the MM7Service

The MM7 service has the following capabilites:

MM7 configuration properties

Property Description
mm7.out.url URL used for submitting short messages to the MM7 MMSC
mm7.out.username Username used for authenticating jSMS with the MM7 MMSC (optional)
mm7.out.password Password used for authenticating jSMS with the MM7 MMSC (optional)
mm7.listen When using jSMS in a standalone (non-webapp) application, this property can be used to enable reception. It must contain the port number where jSMS is listening for incoming messages and reports from the MMSC. If you want to listen on a specific network-interface only, prepend its IP address followed by a collon to this property. Examples:

mms.protocol.mm7.listen=8080   will listen for incoming MM7 requests on port 8080
mms.protocol.mm7.listen=192.168.1.1:7070   will listen for incoming requests on port 7070 on the network interface with the address 192.168.1.1.

When standalone reception is enabled, jSMS listens for incoming HTTP requests from your MM7 MMSC on the port specified.

Notice: jSMS makes use of the Jetty WebServer for MM7 message reception in standalone mode. To enable standalone reception, you must first download the Jetty WebServer and place the Jetty JAR files (jetty-6.x.jar, jetty-util-6.x.jar) into your classpath.

mm7.in.path This is the path component of the URL for incoming messages / reports from the MM7 MMSC. If unset, the path defaults to /.
mm7.in.ssl Set to true to enable HTTPS for the embedded web server. Defaults to false.
mm7.in.ssl.clientauth Set to true to require certificate based client authentication from the MM7 MMSC. Default: false. This property is ignored unless HTTPS is enabled.
mm7.in.username Username required for connecting to the embedded HTTP(s) server. If unset, no username/password authentication is required.
mm7.in.password Password required for connecting to the embedded HTTP(s) server. This setting is ignored unless mm7.in.username is set.

For more information about the settings required, contact your MM7 provider.

Since:
jSMS 2.2

Field Summary
static java.lang.String MM7_IN_PASSWORD
          MM7_IN_PASSWORD is the name of the constant holding the value "mm7.in.password"
static java.lang.String MM7_IN_PATH
          MM7_IN_PATH is the name of the constant holding the value "mm7.in.path"
static java.lang.String MM7_IN_SSL
          MM7_IN_SSL is the name of the constant holding the value "mm7.in.ssl"
static java.lang.String MM7_IN_SSL_CLIENTAUTH
          MM7_IN_SSL is the name of the constant holding the value "mm7.in.ssl.clientauth"
static java.lang.String MM7_IN_USERNAME
          MM7_IN_USERNAME is the name of the constant holding the value "mm7.in.username"
static java.lang.String MM7_LISTEN
          MM7_LISTEN is the name of the constant holding the value "mm7.listen"
static java.lang.String MM7_OUT_PASSWORD
          MM7_OUT_PASSWORD is the name of the constant holding the value "mm7.out.password"
static java.lang.String MM7_OUT_USERNAME
          MM7_OUT_USERNAME is the name of the constant holding the value "mm7.out.username"
static java.lang.String MM7_OUTGOING_URL
          MM7_OUTGOING_URL is the name of the constant holding the value "mm7.out.url"
static java.lang.String MM7_VASID
          MM7_VASID is the name of the constant holding the value "mm7.vas.id"
static java.lang.String MM7_VASPID
          MM7_VASPID is the name of the constant holding the value "mm7.vasp.id"
 
Method Summary
 void connect()
          If MM7 is used in standalone mode and reception is enabled (property mm7.listen), this method will start the embedded web server.
 void disconnect()
          If MM7 is used in standalone mode and reception is enabled (property mm7.listen), this method will stop the embedded web server.
 void extendedCancel(MMSMessage message)
          MM7 extended cancel operation.
 void extendedReplace(MMSMessage oldMessage, MMSMessage newMessage)
          MM7 extended replace operation.
 
Methods inherited from interface com.objectxp.mms.MMSService
cancel, fetch, getListener, getName, hasCapability, replace, send, setListener
 

Field Detail

MM7_VASID

public static final java.lang.String MM7_VASID
MM7_VASID is the name of the constant holding the value "mm7.vas.id"

See Also:
Constant Field Values

MM7_VASPID

public static final java.lang.String MM7_VASPID
MM7_VASPID is the name of the constant holding the value "mm7.vasp.id"

See Also:
Constant Field Values

MM7_OUTGOING_URL

public static final java.lang.String MM7_OUTGOING_URL
MM7_OUTGOING_URL is the name of the constant holding the value "mm7.out.url"

See Also:
Constant Field Values

MM7_OUT_USERNAME

public static final java.lang.String MM7_OUT_USERNAME
MM7_OUT_USERNAME is the name of the constant holding the value "mm7.out.username"

See Also:
Constant Field Values

MM7_OUT_PASSWORD

public static final java.lang.String MM7_OUT_PASSWORD
MM7_OUT_PASSWORD is the name of the constant holding the value "mm7.out.password"

See Also:
Constant Field Values

MM7_LISTEN

public static final java.lang.String MM7_LISTEN
MM7_LISTEN is the name of the constant holding the value "mm7.listen"

See Also:
Constant Field Values

MM7_IN_PATH

public static final java.lang.String MM7_IN_PATH
MM7_IN_PATH is the name of the constant holding the value "mm7.in.path"

See Also:
Constant Field Values

MM7_IN_USERNAME

public static final java.lang.String MM7_IN_USERNAME
MM7_IN_USERNAME is the name of the constant holding the value "mm7.in.username"

See Also:
Constant Field Values

MM7_IN_PASSWORD

public static final java.lang.String MM7_IN_PASSWORD
MM7_IN_PASSWORD is the name of the constant holding the value "mm7.in.password"

See Also:
Constant Field Values

MM7_IN_SSL

public static final java.lang.String MM7_IN_SSL
MM7_IN_SSL is the name of the constant holding the value "mm7.in.ssl"

See Also:
Constant Field Values

MM7_IN_SSL_CLIENTAUTH

public static final java.lang.String MM7_IN_SSL_CLIENTAUTH
MM7_IN_SSL is the name of the constant holding the value "mm7.in.ssl.clientauth"

See Also:
Constant Field Values
Method Detail

connect

public void connect()
             throws MMSException,
                    ProtocolException,
                    TransportException,
                    java.io.IOException
If MM7 is used in standalone mode and reception is enabled (property mm7.listen), this method will start the embedded web server.

Specified by:
connect in interface MMSService
Throws:
TransportException - if the underlying Transport layer fails
MMSException - if connecting to the MMS Relay/Server fails
ProtocolException - if the underlying Protocol implementation fails
java.io.IOException - if an I/O error occurs

disconnect

public void disconnect()
                throws MMSException,
                       ProtocolException,
                       TransportException,
                       java.io.IOException
If MM7 is used in standalone mode and reception is enabled (property mm7.listen), this method will stop the embedded web server.

Specified by:
disconnect in interface MMSService
Throws:
ProtocolException - if the underlying Protocol implementation fails
MMSException - if connecting to the MMS Relay/Server fails
java.io.IOException - if an I/O error occurs
TransportException - if the underlying Transport layer fails

extendedCancel

public void extendedCancel(MMSMessage message)
                    throws MM7Exception,
                           MMSException,
                           ProtocolException
MM7 extended cancel operation.

This method can be used to cancel a previously submitted multimedia message which may already have been delivered to the recipent's mobile phone.

The message passed to extendedCancel must contain the ID of the message to cancel.

Parameters:
message - the message to cancel.
Throws:
MM7Exception - if cancelling the message failed.
MMSException - if the service is not inizialized or not connected.
ProtocolException - if the underlying Protocol implementation fails

extendedReplace

public void extendedReplace(MMSMessage oldMessage,
                            MMSMessage newMessage)
                     throws MM7Exception,
                            MMSException,
                            ProtocolException
MM7 extended replace operation.

This method can be used to replace a previously submitted multimedia message which may already have been delivered to the recipient's mobile phone.

Parameters:
oldMessage - the previously sent message (the message to replace).
newMessage - the replacement message.
Throws:
MM7Exception - if the message could not be replaced.
MMSException - if the service is not initialized or connected.
ProtocolException - if the underlying Protocol implementation fails


object XP, Inc. © 2000-2007. All rights reserved object XP