|
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.impl.gui.main.chat.MetaContactChatTransport
public class MetaContactChatTransport
The single chat implementation of the ChatTransport interface that provides abstraction to protocol provider access.
| Constructor Summary | |
|---|---|
MetaContactChatTransport(ChatSession chatSession,
Contact contact)
Creates an instance of MetaContactChatTransport by specifying the parent chatSession and the contact associated with the transport. |
|
| Method Summary | |
|---|---|
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 |
allowsFileTransfer()
Returns true if this chat transport supports file transfer,
otherwise returns false. |
boolean |
allowsInstantMessage()
Returns true if this chat transport supports instant
messaging, otherwise returns false. |
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. |
void |
contactPresenceStatusChanged(ContactPresenceStatusChangeEvent evt)
Indicates that a contact has changed its status. |
void |
dispose()
Removes all previously added listeners. |
Contact |
getContact()
Returns the contact associated with this transport. |
Object |
getDescriptor()
Returns the descriptor of this chat transport. |
String |
getDisplayName()
Returns the display name corresponding to this chat transport. |
long |
getMaximumFileLength()
Returns the maximum file length supported by the protocol in bytes. |
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. |
PresenceStatus |
getStatus()
Returns the presence status of this transport. |
void |
inviteChatContact(String contactAddress,
String reason)
Invites a contact to join this chat. |
boolean |
isContentTypeSupported(String contentType)
Determines whether this chat transport supports the supplied content type |
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(File file)
Sends the given file through this chat transport file transfer operation set. |
void |
sendInstantMessage(String message,
String mimeType)
Sends the given instant message trough this chat transport, by specifying the mime type (html or plain text). |
void |
sendSmsMessage(Contact contact,
String message)
Sends the given sms message trough this chat transport. |
void |
sendSmsMessage(String phoneNumber,
String messageText)
Sends the given sms message trough this chat transport. |
int |
sendTypingNotification(int typingState)
Sends a typing notification state. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MetaContactChatTransport(ChatSession chatSession,
Contact contact)
chatSession - the parent ChatSessioncontact - the Contact associated with this transport| Method Detail |
|---|
public Contact getContact()
public String getName()
getName in interface ChatTransportpublic String getDisplayName()
getDisplayName in interface ChatTransportpublic PresenceStatus getStatus()
getStatus in interface ChatTransportpublic ProtocolProviderService getProtocolProvider()
getProtocolProvider in interface ChatTransportpublic boolean allowsInstantMessage()
true if this chat transport supports instant
messaging, otherwise returns false.
allowsInstantMessage in interface ChatTransporttrue 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 ChatTransporttrue 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 ChatTransporttrue if this chat transport supports typing
notifications, otherwise returns false.public boolean allowsFileTransfer()
true if this chat transport supports file transfer,
otherwise returns false.
true if this chat transport supports file transfer,
otherwise returns false.
public void sendInstantMessage(String message,
String mimeType)
throws Exception
sendInstantMessage in interface ChatTransportmessage - The message to send.mimeType - The mime type of the message to send: text/html or
text/plain.
Exception - if the send operation is interruptedpublic boolean isContentTypeSupported(String contentType)
isContentTypeSupported in interface ChatTransportcontentType - the type we want to check
public void sendSmsMessage(String phoneNumber,
String messageText)
throws Exception
sendSmsMessage in interface ChatTransportphoneNumber - phone number of the destinationmessageText - The message to send.
Exception - if the send operation is interrupted
public void sendSmsMessage(Contact contact,
String message)
throws Exception
sendSmsMessage in interface ChatTransportcontact - the destination contactmessage - the message to send
Exception - if the send operation is interruptedpublic int sendTypingNotification(int typingState)
sendTypingNotification in interface ChatTransporttypingState - the typing notification state to send
public FileTransfer sendFile(File file)
throws Exception
sendFile in interface ChatTransportfile - the file to send
Exception - if anything goes wrongpublic long getMaximumFileLength()
getMaximumFileLength in interface ChatTransport
public void inviteChatContact(String contactAddress,
String reason)
ChatTransport
inviteChatContact in interface ChatTransportcontactAddress - the address of the contact we invitereason - the reason for the invitepublic ChatSession getParentChatSession()
getParentChatSession in interface ChatTransportpublic void addSmsMessageListener(MessageListener l)
addSmsMessageListener in interface ChatTransportl - The message listener to add.public void addInstantMessageListener(MessageListener l)
addInstantMessageListener in interface ChatTransportl - The message listener to add.public void removeSmsMessageListener(MessageListener l)
removeSmsMessageListener in interface ChatTransportl - The message listener to remove.public void removeInstantMessageListener(MessageListener l)
removeInstantMessageListener in interface ChatTransportl - The message listener to remove.public void contactPresenceStatusChanged(ContactPresenceStatusChangeEvent evt)
contactPresenceStatusChanged in interface ContactPresenceStatusListenerevt - The presence event containing information about the
contact status change.public void dispose()
dispose in interface ChatTransportpublic Object getDescriptor()
getDescriptor in interface ChatTransport
|
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 | |||||||||