public class OperationSetBasicInstantMessagingSipImpl extends AbstractOperationSetBasicInstantMessaging
DEFAULT_MIME_ENCODING, DEFAULT_MIME_TYPE, HTML_MIME_TYPE
Constructor and Description |
---|
OperationSetBasicInstantMessagingSipImpl(ProtocolProviderServiceSipImpl provider)
Creates an instance of this operation set.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addMessageProcessor(SipMessageProcessor processor)
Registers a SipMessageProcessor with this operation set so that it gets
notifications of successful message delivery, failure or reception of
incoming messages..
|
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.
|
(package private) javax.sip.message.Request |
createMessageRequest(Contact to,
Message message)
Construct a Request represent a new message.
|
boolean |
isContentTypeSupported(java.lang.String contentType)
Determines whether the protocol supports the supplied content type
|
boolean |
isOfflineMessagingSupported()
Determines whether the protocol provider (or the protocol itself) support
sending and receiving offline messages.
|
(package private) void |
removeMessageProcessor(SipMessageProcessor processor)
Unregisters processor so that it won't receive any further
notifications upon successful message delivery, failure or reception of
incoming messages..
|
void |
sendInstantMessage(Contact to,
Message message)
Sends the message to the destination indicated by the
to contact.
|
(package private) void |
sendMessageRequest(javax.sip.message.Request messageRequest,
Contact to,
Message messageContent)
Sends messageRequest to the specified destination and logs
messageContent for later use.
|
(package private) void |
shutdown()
Frees allocated resources.
|
addMessageListener, createMessage, createMessage, createMessageWithUID, fireMessageDelivered, fireMessageDeliveryFailed, fireMessageEvent, fireMessageReceived, getInactivityTimeout, isContentTypeSupported, messageDeliveryPendingTransform, removeMessageListener, sendInstantMessage
OperationSetBasicInstantMessagingSipImpl(ProtocolProviderServiceSipImpl provider)
provider
- a ref to the ProtocolProviderServiceImpl
that created us and that we'll use for retrieving the underlying aim
connection.void addMessageProcessor(SipMessageProcessor processor)
processor
- the SipMessageProcessor to register.void removeMessageProcessor(SipMessageProcessor processor)
processor
- the SipMessageProcessor to unregister.public Message createMessage(java.lang.String content, java.lang.String contentType, java.lang.String encoding, java.lang.String subject)
OperationSetBasicInstantMessaging
createMessage
in interface OperationSetBasicInstantMessaging
createMessage
in class AbstractOperationSetBasicInstantMessaging
content
- content valuecontentType
- the MIME-type for contentencoding
- encoding used for contentsubject
- a String subject or null for now
subject.public boolean isOfflineMessagingSupported()
public boolean isContentTypeSupported(java.lang.String contentType)
contentType
- the type we want to checkpublic 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 stack is
not registered and initialized.java.lang.IllegalArgumentException
- if to is not an
instance of ContactImpl.void sendMessageRequest(javax.sip.message.Request messageRequest, Contact to, Message messageContent) throws javax.sip.TransactionUnavailableException, javax.sip.SipException
messageRequest
- the SipRequest that we are about to send.to
- the Contact that we are sending messageRequest to.messageContent
- the SC Message that was used to create
the Request
.javax.sip.TransactionUnavailableException
- if we fail creating the
transaction required to send messageRequest.javax.sip.SipException
- if we fail sending messageRequest.javax.sip.message.Request createMessageRequest(Contact to, Message message) throws OperationFailedException
to
- the Contact to send message tomessage
- the Message to send.OperationFailedException
- if an error occurred during
the creation of the requestvoid shutdown()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.