public interface OperationSetBasicInstantMessaging 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.
|
static java.lang.String |
HTML_MIME_TYPE
HTML mime type for use with messages using html.
|
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.
|
Message |
createMessage(java.lang.String messageText)
Create a Message instance for sending a simple text messages with default
(text/plain) content type and encoding.
|
Message |
createMessage(java.lang.String content,
java.lang.String contentType,
java.lang.String contentEncoding,
java.lang.String subject)
Create a Message instance for sending arbitrary MIME-encoding content.
|
Message |
createMessageWithUID(java.lang.String messageText,
java.lang.String contentType,
java.lang.String messageUID)
Create a Message instance with the specified UID, content type
and a default encoding.
|
long |
getInactivityTimeout()
Returns the inactivity timeout in milliseconds.
|
boolean |
isContentTypeSupported(java.lang.String contentType)
Determines whether the protocol supports the supplied content type
|
boolean |
isContentTypeSupported(java.lang.String contentType,
Contact contact)
Determines whether the protocol supports the supplied content type
for the given contact.
|
boolean |
isOfflineMessagingSupported()
Determines whether the protocol provider (or the protocol itself) support
sending and receiving offline messages.
|
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 |
sendInstantMessage(Contact to,
ContactResource toResource,
Message message)
Sends the message to the destination indicated by the
to contact and the specific toResource.
|
void |
sendInstantMessage(Contact to,
Message message)
Sends the message to the destination indicated by the
to contact.
|
static final java.lang.String DEFAULT_MIME_ENCODING
static final java.lang.String DEFAULT_MIME_TYPE
static final java.lang.String HTML_MIME_TYPE
Message createMessage(java.lang.String content, java.lang.String contentType, java.lang.String contentEncoding, java.lang.String subject)
content
- content valuecontentType
- the MIME-type for contentcontentEncoding
- encoding used for contentsubject
- a String subject or null for now
subject.Message createMessage(java.lang.String messageText)
messageText
- the string content of the message.Message createMessageWithUID(java.lang.String messageText, java.lang.String contentType, java.lang.String messageUID)
messageText
- the string content of the message.contentType
- the MIME-type for contentmessageUID
- the unique identifier of this message.void sendInstantMessage(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 ICQ stack is
not registered and initialized.java.lang.IllegalArgumentException
- if to is not an
instance belonging to the underlying implementation.void sendInstantMessage(Contact to, ContactResource toResource, Message message) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
to
- the Contact to send message totoResource
- the resource to which the message should be sendmessage
- the Message to send.java.lang.IllegalStateException
- if the underlying ICQ stack is
not registered and initialized.java.lang.IllegalArgumentException
- if to is not an
instance belonging to the underlying implementation.void addMessageListener(MessageListener listener)
listener
- the MessageListener to register.void removeMessageListener(MessageListener listener)
listener
- the MessageListener to unregister.boolean isOfflineMessagingSupported()
boolean isContentTypeSupported(java.lang.String contentType)
contentType
- the type we want to checkboolean isContentTypeSupported(java.lang.String contentType, Contact contact)
contentType
- the type we want to checkcontact
- contact which is checked for supported contentTypelong getInactivityTimeout()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.