|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.service.protocol.AbstractOperationSetBasicInstantMessaging
public abstract class AbstractOperationSetBasicInstantMessaging
Represents a default implementation of
OperationSetBasicInstantMessaging in order to make it easier for
implementers to provide complete solutions while focusing on
implementation-specific details.
| Nested Class Summary | |
|---|---|
(package private) static class |
AbstractOperationSetBasicInstantMessaging.MessageEventType
|
| Field Summary |
|---|
| Fields inherited from interface net.java.sip.communicator.service.protocol.OperationSetBasicInstantMessaging |
|---|
DEFAULT_MIME_ENCODING, DEFAULT_MIME_TYPE, HTML_MIME_TYPE |
| Constructor Summary | |
|---|---|
AbstractOperationSetBasicInstantMessaging()
|
|
| 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 encoding,
String subject)
Create a Message instance for sending arbitrary MIME-encoding content. |
Message |
createMessage(String messageText)
Create a Message instance for sending a simple text messages with default (text/plain) content type and encoding. |
abstract Message |
createMessage(String content,
String contentType,
String encoding,
String subject)
Create a Message instance for sending arbitrary MIME-encoding content. |
protected void |
fireMessageDelivered(Message message,
Contact to)
Notifies all registered message listeners that a message has been delivered successfully to its addressee.. |
protected void |
fireMessageDeliveryFailed(Message message,
Contact to,
int errorCode)
|
protected void |
fireMessageEvent(EventObject evt)
Delivers the specified event to all registered message listeners. |
protected void |
fireMessageReceived(Message message,
Contact from)
Notifies all registered message listeners that a message has been received. |
boolean |
isContentTypeSupported(String contentType,
Contact contact)
Determines whether the protocol supports the supplied content type for the given contact. |
MessageDeliveredEvent |
messageDeliveryPendingTransform(MessageDeliveredEvent evt)
|
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.. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.java.sip.communicator.service.protocol.OperationSetBasicInstantMessaging |
|---|
isContentTypeSupported, isOfflineMessagingSupported, sendInstantMessage |
| Constructor Detail |
|---|
public AbstractOperationSetBasicInstantMessaging()
| Method Detail |
|---|
public void addMessageListener(MessageListener listener)
addMessageListener in interface OperationSetBasicInstantMessaginglistener - the MessageListener to register.
public Message createMessage(byte[] content,
String contentType,
String encoding,
String subject)
content - content valuecontentType - the MIME-type for contentencoding - encoding used for contentsubject - a String subject or null for now
subject.
public Message createMessage(String messageText)
createMessage in interface OperationSetBasicInstantMessagingmessageText - the string content of the message.
public abstract Message createMessage(String content,
String contentType,
String encoding,
String subject)
OperationSetBasicInstantMessaging
createMessage in interface OperationSetBasicInstantMessagingcontent - content valuecontentType - the MIME-type for contentencoding - encoding used for contentsubject - a String subject or null for now
subject.
protected void fireMessageDelivered(Message message,
Contact to)
message - the Message that has been delivered.to - the Contact that message was delivered to.
protected void fireMessageDeliveryFailed(Message message,
Contact to,
int errorCode)
protected void fireMessageEvent(EventObject evt)
evt - the EventObject that we'd like delivered to all
registered message listeners.
protected void fireMessageReceived(Message message,
Contact from)
message - the Message that has been received.from - the Contact that message was received from.public void removeMessageListener(MessageListener listener)
removeMessageListener in interface OperationSetBasicInstantMessaginglistener - the MessageListener to unregister.public MessageDeliveredEvent messageDeliveryPendingTransform(MessageDeliveredEvent evt)
public boolean isContentTypeSupported(String contentType,
Contact contact)
isContentTypeSupported in interface OperationSetBasicInstantMessagingcontentType - the type we want to checkcontact - contact which is checked for supported contentType
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||