public class ConferenceChatTransport extends java.lang.Object implements ChatTransport
Constructor and Description |
---|
ConferenceChatTransport(ChatSession chatSession,
ChatRoom chatRoom)
Creates an instance of ConferenceChatTransport by specifying the
parent chat session and the chat room associated with this transport.
|
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()
Not used.
|
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 of this chat transport.
|
java.lang.String |
getDisplayName()
Returns the display name corresponding to this chat transport.
|
long |
getMaximumFileLength()
Returns the maximum file length supported by the protocol in bytes.
|
java.lang.String |
getName()
Returns the contact address corresponding to 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 the given contact in this chat conference.
|
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)
Sending files through a chat room is not yet supported by this chat
transport implementation.
|
void |
sendInstantMessage(java.lang.String messageText,
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)
Sending file in sms messages is not supported by this chat transport
implementation.
|
void |
sendSmsMessage(java.lang.String message)
Sending sms messages is not supported by this chat transport
implementation.
|
void |
sendSmsMessage(java.lang.String phoneNumber,
java.lang.String message)
Sending sms messages is not supported by this chat transport
implementation.
|
int |
sendTypingNotification(int typingState)
Sending typing notifications is not supported by this chat transport
implementation.
|
public ConferenceChatTransport(ChatSession chatSession, ChatRoom chatRoom)
chatSession
- the parent chat session.chatRoom
- the chat room associated with this conference transport.public java.lang.String getName()
getName
in interface ChatTransport
public java.lang.String getDisplayName()
getDisplayName
in interface ChatTransport
public java.lang.String getResourceName()
getResourceName
in interface ChatTransport
public boolean isDisplayResourceOnly()
isDisplayResourceOnly
in interface ChatTransport
public PresenceStatus getStatus()
getStatus
in interface ChatTransport
public ProtocolProviderService getProtocolProvider()
getProtocolProvider
in interface ChatTransport
public boolean allowsInstantMessage()
true
if this chat transport supports instant
messaging, otherwise returns false
.allowsInstantMessage
in interface ChatTransport
true
if this chat transport supports instant
messaging, otherwise returns false
.public boolean allowsSmsMessage()
true
if this chat transport supports sms
messaging, otherwise returns false
.allowsSmsMessage
in interface ChatTransport
true
if this chat transport supports sms
messaging, otherwise returns false
.public boolean allowsTypingNotifications()
true
if this chat transport supports typing
notifications, otherwise returns false
.allowsTypingNotifications
in interface ChatTransport
true
if this chat transport supports typing
notifications, otherwise returns false
.public void sendInstantMessage(java.lang.String messageText, java.lang.String mimeType) throws java.lang.Exception
sendInstantMessage
in interface ChatTransport
messageText
- 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 succeedpublic boolean isContentTypeSupported(java.lang.String contentType)
isContentTypeSupported
in interface ChatTransport
contentType
- the type we want to checkpublic void sendSmsMessage(java.lang.String phoneNumber, java.lang.String message) throws java.lang.Exception
sendSmsMessage
in interface ChatTransport
phoneNumber
- the phone number to which to send the messagemessage
- The message to send.java.lang.Exception
- if the send doesn't succeedpublic void sendSmsMessage(java.lang.String message) throws java.lang.Exception
sendSmsMessage
in interface ChatTransport
message
- The message to send.java.lang.Exception
- if the send doesn't succeedpublic FileTransfer sendMultimediaFile(java.io.File file) throws java.lang.Exception
sendMultimediaFile
in interface ChatTransport
file
- the file to sendjava.lang.Exception
- if the send doesn't succeedpublic boolean askForSMSNumber()
askForSMSNumber
in interface ChatTransport
public int sendTypingNotification(int typingState)
sendTypingNotification
in interface ChatTransport
typingState
- the typing notification state to sendpublic FileTransfer sendFile(java.io.File file) throws java.lang.Exception
sendFile
in interface ChatTransport
file
- the file to sendjava.lang.Exception
- if the send doesn't succeedpublic long getMaximumFileLength()
getMaximumFileLength
in interface ChatTransport
public void inviteChatContact(java.lang.String contactAddress, java.lang.String reason)
inviteChatContact
in interface ChatTransport
contactAddress
- the address of the contact to invitereason
- the reason for the invitationpublic ChatSession getParentChatSession()
getParentChatSession
in interface ChatTransport
public void addSmsMessageListener(MessageListener l)
addSmsMessageListener
in interface ChatTransport
l
- The message listener to add.public void addInstantMessageListener(MessageListener l)
addInstantMessageListener
in interface ChatTransport
l
- The message listener to add.public void removeSmsMessageListener(MessageListener l)
removeSmsMessageListener
in interface ChatTransport
l
- The message listener to remove.public void removeInstantMessageListener(MessageListener l)
removeInstantMessageListener
in interface ChatTransport
l
- The message listener to remove.public void dispose()
ChatTransport
dispose
in interface ChatTransport
public java.lang.Object getDescriptor()
getDescriptor
in interface ChatTransport
public void correctInstantMessage(java.lang.String message, java.lang.String mimeType, java.lang.String correctedMessageUID)
correctInstantMessage
in interface ChatTransport
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.public boolean allowsMessageCorrections()
true
if this chat transport supports message
corrections and false otherwise.allowsMessageCorrections
in interface ChatTransport
true
if this chat transport supports message
corrections and false otherwise.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.