public interface MMSService
Objects implementing this interface may be constructed by
using the MMSServiceFactory
.
Modifier and Type | Method and Description |
---|---|
void |
cancel(MMSMessage message)
Cancel a previously submitted multimedia message.
|
void |
connect()
Connect to the MMS-Proxy-Relay.
|
void |
disconnect()
Closes the connection to the MMS-Proxy-Relay.
|
MMSMessage |
fetch(MMSNotification notification)
Fetches a message from the MMS-Proxy-Relay.
|
MMSListener |
getListener()
Returns the current MMS listener for this service.
|
java.lang.String |
getName()
Returns the name of the MMS Service.
|
boolean |
hasCapability(MMSCapability capability)
Determine if a MMS Service has a specific capability.
|
void |
replace(MMSMessage oldMessage,
MMSMessage newMessage)
Replace a previously submitted multimedia message.
|
void |
send(MMSMessage message)
Send a MMS message.
|
void |
setListener(MMSListener listener)
Set a MMS listener for processing incoming multimedia messages, reports
and notifications.
|
void connect() throws MMSException, ProtocolException, TransportException, java.io.IOException
MMSException
- if connecting to the MMS Relay/Server failsProtocolException
- if the underlying Protocol implementation failsTransportException
- if the underlying Transport layer failsjava.io.IOException
- if an I/O error occursvoid disconnect() throws MMSException, ProtocolException, TransportException, java.io.IOException
MMSException
- if connecting to the MMS Relay/Server failsProtocolException
- if the underlying Protocol implementation failsTransportException
- if the underlying Transport layer failsjava.io.IOException
- if an I/O error occursvoid send(MMSMessage message) throws MMSException, ProtocolException, java.lang.IllegalStateException
message
- the message to sendMMSException
- if the MMSMessage is not valid,ProtocolException
- if the delivery of the Message fails.java.lang.IllegalStateException
- if the service is not connected.MMSMessage fetch(MMSNotification notification) throws MMSException
The MMS Relay/Server first sends a MMSNotification
which advises the client that a MMS is ready to be picked up on the MMS Relay/Server.
This method fetches the MMSMessage corresponding to the given MMSNotification.
MMSException
- if the MMS can not be picked up.java.lang.IllegalStateException
- if the service is not connected.java.lang.String getName()
boolean hasCapability(MMSCapability capability)
capability
- one of the Constants in the MMSCapability
class.void setListener(MMSListener listener)
listener
- An object implementing the MMSListener
interface.MMSListener getListener()
void cancel(MMSMessage message) throws java.lang.UnsupportedOperationException, java.lang.IllegalStateException, MMSException, ProtocolException
message
- the message to canceljava.lang.UnsupportedOperationException
- if the underlying MMS protocol does
not support cancellation.java.lang.IllegalStateException
- if the service is not connected.ProtocolException
- if the underlying Protocol implementation failsMMSException
- if the MMS cannot be cancelled.void replace(MMSMessage oldMessage, MMSMessage newMessage) throws java.lang.UnsupportedOperationException, java.lang.IllegalStateException, MMSException, ProtocolException
oldMessage
- the previously sent message.newMessage
- the replacement message.java.lang.UnsupportedOperationException
- if the underlying MMS protocol does not
support message replacement.java.lang.IllegalStateException
- if the service is not connected.MMSException
- if the MMS cannot be replaced.ProtocolException
- if the underlying Protocol implementation failsobject XP, Inc. © 2000-2013. All rights reserved object XP