public class OperationSetBasicInstantMessagingJabberImpl extends AbstractOperationSetBasicInstantMessaging implements OperationSetMessageCorrection
Modifier and Type | Class and Description |
---|---|
static class |
OperationSetBasicInstantMessagingJabberImpl.StoredThreadID
Contains the complete jid of a specific user and the time that it was
last used so that we could remove it after a certain point.
|
DEFAULT_MIME_ENCODING, DEFAULT_MIME_TYPE, HTML_MIME_TYPE
Constructor and Description |
---|
OperationSetBasicInstantMessagingJabberImpl(ProtocolProviderServiceJabberImpl provider)
Creates an instance of this operation set.
|
Modifier and Type | Method and Description |
---|---|
void |
addMessageFilters(org.jivesoftware.smack.filter.PacketFilter filter)
Adds additional filters for incoming messages.
|
void |
correctMessage(Contact to,
ContactResource resource,
Message message,
java.lang.String correctedMessageUID)
Replaces the message with ID correctedMessageUID sent to
the contact to with the message message
|
Message |
createMessage(java.lang.String content,
java.lang.String contentType)
Create a Message instance for sending arbitrary MIME-encoding content.
|
(package private) Message |
createMessage(java.lang.String content,
java.lang.String contentType,
java.lang.String messageUID) |
Message |
createMessage(java.lang.String content,
java.lang.String contentType,
java.lang.String encoding,
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.
|
java.lang.String |
getRecentJIDForAddress(java.lang.String address) |
(package private) java.lang.String |
getThreadIDForAddress(java.lang.String jid)
Returns the last jid that the party with the specified address
contacted us from or null(or bare jid) if we don't have a jid
for the specified address yet.
|
boolean |
isContentTypeSupported(java.lang.String contentType)
Determines wheter 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 wheter the protocol provider (or the protocol itself) support
sending and receiving offline messages.
|
static java.lang.String |
nextThreadID()
Returns the next unique thread id.
|
void |
sendInstantMessage(Contact to,
ContactResource toResource,
Message message)
Sends the message to the destination indicated by the
to.
|
void |
sendInstantMessage(Contact to,
Message message)
Sends the message to the destination indicated by the
to contact.
|
addMessageListener, createMessage, createMessage, fireMessageDelivered, fireMessageDeliveryFailed, fireMessageEvent, fireMessageReceived, messageDeliveryPendingTransform, removeMessageListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addMessageListener, createMessage, removeMessageListener
OperationSetBasicInstantMessagingJabberImpl(ProtocolProviderServiceJabberImpl provider)
provider
- a reference to the ProtocolProviderServiceImpl
that created us and that we'll use for retrieving the underlying aim
connection.public Message createMessageWithUID(java.lang.String messageText, java.lang.String contentType, java.lang.String messageUID)
createMessageWithUID
in interface OperationSetBasicInstantMessaging
createMessageWithUID
in class AbstractOperationSetBasicInstantMessaging
messageText
- the string content of the message.contentType
- the MIME-type for contentmessageUID
- the unique identifier of this message.public Message createMessage(java.lang.String content, java.lang.String contentType)
content
- content valuecontentType
- the MIME-type for contentpublic Message createMessage(java.lang.String content, java.lang.String contentType, java.lang.String encoding, java.lang.String subject)
createMessage
in interface OperationSetBasicInstantMessaging
createMessage
in class AbstractOperationSetBasicInstantMessaging
content
- content valuecontentType
- the MIME-type for contentsubject
- the Subject of the message that we'd like to create.encoding
- the enconding of the message that we will be sending.Message createMessage(java.lang.String content, java.lang.String contentType, java.lang.String messageUID)
public boolean isOfflineMessagingSupported()
isOfflineMessagingSupported
in interface OperationSetBasicInstantMessaging
public boolean isContentTypeSupported(java.lang.String contentType)
isContentTypeSupported
in interface OperationSetBasicInstantMessaging
contentType
- the type we want to checkpublic boolean isContentTypeSupported(java.lang.String contentType, Contact contact)
isContentTypeSupported
in interface OperationSetBasicInstantMessaging
isContentTypeSupported
in class AbstractOperationSetBasicInstantMessaging
contentType
- the type we want to checkcontact
- contact which is checked for supported contentTypejava.lang.String getThreadIDForAddress(java.lang.String jid)
jid
- the jid that we'd like to obtain a threadID for.public void sendInstantMessage(Contact to, Message message) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
sendInstantMessage
in interface OperationSetBasicInstantMessaging
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 of ContactImpl.public void sendInstantMessage(Contact to, ContactResource toResource, Message message) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
sendInstantMessage
in interface OperationSetBasicInstantMessaging
sendInstantMessage
in class AbstractOperationSetBasicInstantMessaging
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.public void correctMessage(Contact to, ContactResource resource, Message message, java.lang.String correctedMessageUID)
correctMessage
in interface OperationSetMessageCorrection
to
- The contact to send the message to.message
- The new message.correctedMessageUID
- The ID of the message being replaced.resource
- The ContactResource to send the message to.public java.lang.String getRecentJIDForAddress(java.lang.String address)
public long getInactivityTimeout()
getInactivityTimeout
in interface OperationSetBasicInstantMessaging
getInactivityTimeout
in class AbstractOperationSetBasicInstantMessaging
public void addMessageFilters(org.jivesoftware.smack.filter.PacketFilter filter)
filter
- to addpublic static java.lang.String nextThreadID()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.