public interface ChatTransport
Modifier and Type | Method and Description |
---|---|
void |
addInstantMessageListener(MessageListener l)
Adds an instant message listener to this chat transport.
|
void |
addSmsMessageListener(MessageListener l)
Adds an sms message listener to this chat transport.
|
boolean |
allowsInstantMessage()
Returns
true if this chat transport supports instant
messaging, otherwise returns false . |
boolean |
allowsMessageCorrections()
Returns true if this chat transport supports message
corrections and false otherwise.
|
boolean |
allowsSmsMessage()
Returns
true if this chat transport supports sms
messaging, otherwise returns false . |
boolean |
allowsTypingNotifications()
Returns
true if this chat transport supports typing
notifications, otherwise returns false . |
boolean |
askForSMSNumber()
Whether a dialog need to be opened so the user can enter the destination
number.
|
void |
correctInstantMessage(java.lang.String message,
java.lang.String mimeType,
java.lang.String correctedMessageUID)
Sends message as a message correction through this transport,
specifying the mime type (html or plain text) and the id of the
message to replace.
|
void |
dispose()
Disposes this chat transport.
|
java.lang.Object |
getDescriptor()
Returns the descriptor object of this ChatTransport.
|
java.lang.String |
getDisplayName()
Returns the display name of this chat transport.
|
long |
getMaximumFileLength()
Returns the maximum file length supported by the protocol in bytes.
|
java.lang.String |
getName()
Returns the name of this chat transport.
|
ChatSession |
getParentChatSession()
Returns the parent session of this chat transport.
|
ProtocolProviderService |
getProtocolProvider()
Returns the ProtocolProviderService, corresponding to this chat
transport.
|
java.lang.String |
getResourceName()
Returns the resource name of this chat transport.
|
PresenceStatus |
getStatus()
Returns the presence status of this transport.
|
void |
inviteChatContact(java.lang.String contactAddress,
java.lang.String reason)
Invites a contact to join this chat.
|
boolean |
isContentTypeSupported(java.lang.String contentType)
Determines whether this chat transport supports the supplied content type
|
boolean |
isDisplayResourceOnly()
Indicates if the display name should only show the resource.
|
void |
removeInstantMessageListener(MessageListener l)
Removes the instant message listener from this chat transport.
|
void |
removeSmsMessageListener(MessageListener l)
Removes the given sms message listener from this chat transport.
|
FileTransfer |
sendFile(java.io.File file)
Sends the given file trough this chat transport.
|
void |
sendInstantMessage(java.lang.String message,
java.lang.String mimeType)
Sends the given instant message trough this chat transport, by specifying
the mime type (html or plain text).
|
FileTransfer |
sendMultimediaFile(java.io.File file)
Sends the given SMS multimedia message trough this chat transport,
leaving the transport to choose the destination.
|
void |
sendSmsMessage(java.lang.String message)
Sends the given SMS message trough this chat transport, leaving
the transport to choose the destination.
|
void |
sendSmsMessage(java.lang.String phoneNumber,
java.lang.String message)
Sends the given SMS message trough this chat transport.
|
int |
sendTypingNotification(int typingState)
Sends a typing notification state.
|
java.lang.Object getDescriptor()
boolean allowsInstantMessage()
true
if this chat transport supports instant
messaging, otherwise returns false
.true
if this chat transport supports instant
messaging, otherwise returns false
boolean allowsMessageCorrections()
true
if this chat transport supports message
corrections and false otherwise.boolean allowsSmsMessage()
true
if this chat transport supports sms
messaging, otherwise returns false
.true
if this chat transport supports sms
messaging, otherwise returns false
boolean allowsTypingNotifications()
true
if this chat transport supports typing
notifications, otherwise returns false
.true
if this chat transport supports typing
notifications, otherwise returns false
java.lang.String getName()
java.lang.String getDisplayName()
java.lang.String getResourceName()
boolean isDisplayResourceOnly()
PresenceStatus getStatus()
ProtocolProviderService getProtocolProvider()
void sendInstantMessage(java.lang.String message, java.lang.String mimeType) throws java.lang.Exception
message
- The message to send.mimeType
- The mime type of the message to send: text/html or
text/plain.java.lang.Exception
- if the send doesn't succeedvoid correctInstantMessage(java.lang.String message, java.lang.String mimeType, java.lang.String correctedMessageUID)
message
- The message to send.mimeType
- The mime type of the message to send: text/html or
text/plain.correctedMessageUID
- The ID of the message being corrected by
this message.boolean isContentTypeSupported(java.lang.String contentType)
contentType
- the type we want to checkboolean askForSMSNumber()
void sendSmsMessage(java.lang.String phoneNumber, java.lang.String message) throws java.lang.Exception
phoneNumber
- the phone number to which to send the messagemessage
- The message to send.java.lang.Exception
- if the send doesn't succeedvoid sendSmsMessage(java.lang.String message) throws java.lang.Exception
message
- The message to send.java.lang.Exception
- if the send doesn't succeedFileTransfer sendMultimediaFile(java.io.File file) throws java.lang.Exception
file
- the file to sendjava.lang.Exception
- if the send doesn't succeedint sendTypingNotification(int typingState)
typingState
- the typing notification state to sendFileTransfer sendFile(java.io.File file) throws java.lang.Exception
file
- the file to sendjava.lang.Exception
- if the send doesn't succeedlong getMaximumFileLength()
void inviteChatContact(java.lang.String contactAddress, java.lang.String reason)
contactAddress
- the address of the contact we invitereason
- the reason for the inviteChatSession getParentChatSession()
void addSmsMessageListener(MessageListener l)
l
- The message listener to add.void addInstantMessageListener(MessageListener l)
l
- The message listener to add.void removeSmsMessageListener(MessageListener l)
l
- The message listener to remove.void removeInstantMessageListener(MessageListener l)
l
- The message listener to remove.void dispose()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.