This is the optimized implementation for WMA 2.0, which provides
classes that allow Java applications to access MMS functionality
on a mobile device.
This implementation provides its own Protocol.java that
makes native calls to access the platform provided MMS functions.
The classes in this package support the sending and receiving of MMS messages.
The classes in this package,
{@link com.sun.midp.io.j2me.mms.Protocol Protocol},
{@link com.sun.midp.io.j2me.mms.MMSAddress MMSAddress} and
{@link com.sun.midp.io.j2me.mms.MultipartObject MultipartObject} define
this implementation. MultipartObject extends MessageObject
and implements a MMS message. MMSAddress provides MMS address
parsing and validation.
Connection and Message Lifecycle
Connections can be made in server mode or in client mode.
In server mode, messages can be sent or received. In client mode, messages
can be sent only. Applications can treat
sending and receiving independently.
To receive messages, the application can open the connection by passing
a string containing an "application ID" to the Connector.open method. A
MessageConnection object is returned, on which the message can be
received. If there are no messages in the queue, the receive()
method will block until one arrives. When a message has been received,
methods are available in the MessageObject class for retrieving
its address and data parts. Calling the close() method closes the
connection.
To send messages, the application will either obtain an existing
Message object or use the newMessage factory method to
create one. If the application creates a Message object,
methods are available in the MultipartObject class for setting
its address and data
parts. The application can open a connection by passing a string containing
a fully-qualified MMS URL address to the
Connector.open method. A MessageConnection
object is returned, on which the message can be sent. Calling the
close() method closes the connection.
@since WMA 2.0
|