public interface OperationSetSmsMessaging extends OperationSet
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_MIME_ENCODING
Default encoding for outgoing messages.
|
static java.lang.String |
DEFAULT_MIME_TYPE
Default mime type for outgoing messages.
|
Modifier and Type | Method and Description |
---|---|
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..
|
boolean |
askForNumber(Contact to)
Whether the implementation do not know how to send sms to the supplied
contact and should as for number.
|
Message |
createMessage(byte[] content,
java.lang.String contentType,
java.lang.String contentEncoding)
Create a Message instance for sending arbitrary MIME-encoding content.
|
Message |
createMessage(java.lang.String messageText)
Create a Message instance for sending a sms messages with default
(text/plain) content type and encoding.
|
Contact |
getContact(java.lang.String to)
Returns the contact to send sms to.
|
boolean |
isContentTypeSupported(java.lang.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..
|
FileTransfer |
sendMultimediaFile(Contact to,
java.io.File file)
Sends the file to the destination indicated by the
to parameter.
|
void |
sendSmsMessage(Contact to,
Message message)
Sends the message to the destination indicated by the
to contact.
|
void |
sendSmsMessage(java.lang.String to,
Message message)
Sends the message to the destination indicated by the
to parameter.
|
static final java.lang.String DEFAULT_MIME_ENCODING
static final java.lang.String DEFAULT_MIME_TYPE
Message createMessage(byte[] content, java.lang.String contentType, java.lang.String contentEncoding)
content
- content valuecontentType
- the MIME-type for contentcontentEncoding
- encoding used for contentMessage createMessage(java.lang.String messageText)
messageText
- the string content of the message.void sendSmsMessage(Contact to, Message message) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
to
- the Contact to send message tomessage
- the Message to send.java.lang.IllegalStateException
- if the underlying stack is
not registered and initialized.java.lang.IllegalArgumentException
- if to is not an
instance belonging to the underlying implementation.void sendSmsMessage(java.lang.String to, Message message) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
to
- the destination to send message tomessage
- the Message to send.java.lang.IllegalStateException
- if the underlying stack is
not registered and initialized.java.lang.IllegalArgumentException
- if to is not an
instance belonging to the underlying implementation.FileTransfer sendMultimediaFile(Contact to, java.io.File file) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException, OperationNotSupportedException
to
- the destination to send message tofile
- the file to send.java.lang.IllegalStateException
- if the underlying stack is
not registered and initialized.java.lang.IllegalArgumentException
- if to is not an
instance belonging to the underlying implementation.OperationNotSupportedException
- if the given contact client or
server does not support file transfersvoid addMessageListener(MessageListener listener)
listener
- the MessageListener to register.void removeMessageListener(MessageListener listener)
listener
- the MessageListener to unregister.boolean isContentTypeSupported(java.lang.String contentType)
contentType
- the type we want to checkContact getContact(java.lang.String to)
to
- the number to send sms.boolean askForNumber(Contact to)
to
- the contact to send sms.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.