public interface MM1Service extends MMSService, MessageEventListener
MM1 uses a WSP/WTP connection to communicate with a MMS-Proxy/Relay over a WAP gateway. WSP (Wireless Session Protocol) is comparable to the HTTP Protocol but adjusted for wireless connections. WTP (Wireless Transport Protocol) is the equivalent of the IP Protocol.
To receive a MMS, the MMS-Proxy/Relay sends a MMSNotification
to the client encapsulated in a SMS (WAP-PUSH). The MM1Service
fetches the MMS using the WSP/WTP connection (WAP-GET).
To send a MMS, the message is also transported over the WSP/WTP connection (WAP-POST).
The MM1 service implements the MessageEventListener interface and can
therefore be used to capture MM1 notifications
received through a SmsService
connection. When adding the MM1 service to a
MultiPartReceiver
that handles incoming multipart short messages, it
will catch MM1 notifications and will pass them to the registered
MMSListener
by invoking its handleNotification
method.
capabilites
:
Property | Description |
---|---|
mms.protocol.mm1.mmsc.url | URL of the MMSC (e.g. "http://mmsc.yourprovider.com:8008/mms) |
mms.protocol.mm1.wapgateway | IP address (and port) of the MMS Relay/Server gateway. The port may be appended to the address, separated with a ':' (host:port).I f the port is not specified, it defaults to 9201. |
mms.protocol.mm1.timeout.login | Timeout in seconds for connecting to the WAP gateway. Default: 30 sec. |
mms.protocol.mm1.timeout.send | Timeout in seconds for sending a MMS message. Default: 300 sec. |
mms.protocol.mm1.timeout.fetch | Timeout in seconds for fetching a MMS message. Default: 300 sec. |
mms.protocol.mm1.report.allowed | Indicate if the sending of delivery reports is allowed. Default is [true]. Set it to false if you do not want to send a report to the sender after you have received a MMS. |
mms.protocol.mm1.delayed.retrieval | This setting can be used to configure if jSMS should fetch MMS messages using the "Delayed Retrieval" Transaction flow. If unset, messages will be fetched using the "Immediate Retrieval" Transaction flow. Allowed values: "true", "false" with "false" being the default. |
mms.protocol.mm1.user.agent | This setting can be used to specify the User-Agent that jSMS uses when establishing a connection with the WAP gateway. If unset, the User-Agent defaults to "jSMS/2.1". |
mms.protocol.mm1.version | MMS Encapsulation Version to use. Allowed values: 1.0, 1.1, 1.2. If unset, outgoing messages are encoded according to MMS version 1.1. Please note that for outgoing messages, attributes not supported by the specified protocol version are silently ignored. |
For more information about the settings required, contact your MMSC provider or consult their web site. The settings used by jSMS are the same settings used by your mobile phone for MMS communication.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DELAYED_RETRIEVAL
REPORT_ALLOWED is the name of the constant holding the value "mm1.delayed.retrieval".
|
static java.lang.String |
FETCH_TIMEOUT
FETCH_TIMEOUT is the name of the constant holding the value "mm1.timeout.fetch".
|
static java.lang.String |
GATEWAY_URI
GATEWAY_URI is the name of the constant holding the value "mm1.wapgateway".
|
static java.lang.String |
LOGIN_TIMEOUT
LOGIN_TIMEOUT is the name of the constant holding the value "mm1.timeout.login".
|
static java.lang.String |
MMS_CENTER_URI
MMS_CENTER_URI is the name of the constant holding the value "mm1.mmsc.url".
|
static java.lang.String |
MMS_VERSION
MMS_VERSION is the name of the constant holding the value "mm1.version".
|
static java.lang.String |
REPORT_ALLOWED
REPORT_ALLOWED is the name of the constant holding the value "mm1.report.allowed".
|
static java.lang.String |
RETRIES_ON_SERVER_ERROR
RETRIES_ON_SERVER_ERROR is the name of the constant holding the value "mm1.retries.on.server.error".
|
static java.lang.String |
SEND_TIMEOUT
SEND_TIMEOUT is the name of the constant holding the value "mm1.timeout.send".
|
static java.lang.String |
USER_AGENT
USER_AGENT is the name of the constant holding the value "mm1.user.agent".
|
Modifier and Type | Method and Description |
---|---|
MMSMessage |
parseMMSEncoding(byte[] mmsenc)
Construct a MMSMessage by parsing a byte array holding a MMS structure
as specified in OMA-MMS-ENC v1.x.
|
MMSMessage |
parseMMSEncoding(java.io.InputStream in)
Construct a MMSMessage by parsing an input stream returning a MMS structure
as specified in OMA-MMS-ENC v1.x.
|
cancel, connect, disconnect, fetch, getListener, getName, hasCapability, replace, send, setListener
handleMessageEvent
static final java.lang.String MMS_CENTER_URI
static final java.lang.String GATEWAY_URI
static final java.lang.String REPORT_ALLOWED
static final java.lang.String DELAYED_RETRIEVAL
static final java.lang.String RETRIES_ON_SERVER_ERROR
static final java.lang.String LOGIN_TIMEOUT
static final java.lang.String SEND_TIMEOUT
static final java.lang.String FETCH_TIMEOUT
static final java.lang.String USER_AGENT
static final java.lang.String MMS_VERSION
MMSMessage parseMMSEncoding(java.io.InputStream in) throws java.io.IOException, ParseException
in
- input stream returning MMS structureParseException
- if the MMS structure cannot be converted.java.io.IOException
- if reading from the input stream fails.MMSMessage parseMMSEncoding(byte[] mmsenc) throws ParseException
mmsenc
- byte array holding a MMS structureParseException
- if the MMS structure cannot be converted.object XP, Inc. © 2000-2013. All rights reserved object XP