Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol
Interface OperationSetSmsMessaging

All Superinterfaces:
OperationSet

public interface OperationSetSmsMessaging
extends OperationSet

Provides basic functionality for sending and receiving SMS Messages.

Author:
Damian Minkov

Field Summary
static String DEFAULT_MIME_ENCODING
          Default encoding for outgoing messages.
static String DEFAULT_MIME_TYPE
          Default mime type for outgoing messages.
 
Method Summary
 void addMessageListener(MessageListener listener)
          Registers a MessageListener with this operation set so that it gets notifications of successful message delivery, failure or reception of incoming messages..
 Message createMessage(byte[] content, String contentType, String contentEncoding)
          Create a Message instance for sending arbitrary MIME-encoding content.
 Message createMessage(String messageText)
          Create a Message instance for sending a sms messages with default (text/plain) content type and encoding.
 boolean isContentTypeSupported(String contentType)
          Determines whether the protocol supports the supplied content type
 void removeMessageListener(MessageListener listener)
          Unregisters listener so that it won't receive any further notifications upon successful message delivery, failure or reception of incoming messages..
 void sendSmsMessage(Contact to, Message message)
          Sends the message to the destination indicated by the to contact.
 void sendSmsMessage(String to, Message message)
          Sends the message to the destination indicated by the to parameter.
 

Field Detail

DEFAULT_MIME_ENCODING

static final String DEFAULT_MIME_ENCODING
Default encoding for outgoing messages.

See Also:
Constant Field Values

DEFAULT_MIME_TYPE

static final String DEFAULT_MIME_TYPE
Default mime type for outgoing messages.

See Also:
Constant Field Values
Method Detail

createMessage

Message createMessage(byte[] content,
                      String contentType,
                      String contentEncoding)
Create a Message instance for sending arbitrary MIME-encoding content.

Parameters:
content - content value
contentType - the MIME-type for content
contentEncoding - encoding used for content
Returns:
the newly created message.

createMessage

Message createMessage(String messageText)
Create a Message instance for sending a sms messages with default (text/plain) content type and encoding.

Parameters:
messageText - the string content of the message.
Returns:
Message the newly created message

sendSmsMessage

void sendSmsMessage(Contact to,
                    Message message)
                    throws IllegalStateException,
                           IllegalArgumentException
Sends the message to the destination indicated by the to contact.

Parameters:
to - the Contact to send message to
message - the Message to send.
Throws:
IllegalStateException - if the underlying stack is not registered and initialized.
IllegalArgumentException - if to is not an instance belonging to the underlying implementation.

sendSmsMessage

void sendSmsMessage(String to,
                    Message message)
                    throws IllegalStateException,
                           IllegalArgumentException
Sends the message to the destination indicated by the to parameter.

Parameters:
to - the destination to send message to
message - the Message to send.
Throws:
IllegalStateException - if the underlying stack is not registered and initialized.
IllegalArgumentException - if to is not an instance belonging to the underlying implementation.

addMessageListener

void addMessageListener(MessageListener listener)
Registers a MessageListener with this operation set so that it gets notifications of successful message delivery, failure or reception of incoming messages..

Parameters:
listener - the MessageListener to register.

removeMessageListener

void removeMessageListener(MessageListener listener)
Unregisters listener so that it won't receive any further notifications upon successful message delivery, failure or reception of incoming messages..

Parameters:
listener - the MessageListener to unregister.

isContentTypeSupported

boolean isContentTypeSupported(String contentType)
Determines whether the protocol supports the supplied content type

Parameters:
contentType - the type we want to check
Returns:
true if the protocol supports it and false otherwise.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.