public class MetaContactChatSession extends ChatSession implements MetaContactListListener, ContactResourceListener
chatHistoryFilter, chatParticipants, chatTransports, persistableAddress
Constructor and Description |
---|
MetaContactChatSession(ChatSessionRenderer sessionRenderer,
MetaContact metaContact,
Contact protocolContact,
ContactResource contactResource)
Creates an instance of MetaContactChatSession by specifying the
renderer, which gives the connection with the UI, the meta contact
corresponding to the session and the protocol contact to be used as
transport.
|
Modifier and Type | Method and Description |
---|---|
void |
childContactsReordered(MetaContactGroupEvent evt)
Indicates that the order under which the child contacts were ordered
inside the source group has changed.
|
void |
contactResourceAdded(ContactResourceEvent event)
Called when a new ContactResource has been added to the list
of available Contact resources.
|
void |
contactResourceModified(ContactResourceEvent event)
Called when a ContactResource in the list of available
Contact resources has been modified.
|
void |
contactResourceRemoved(ContactResourceEvent event)
Called when a ContactResource has been removed to the list
of available Contact resources.
|
void |
dispose()
Disposes this chat session.
|
byte[] |
getChatAvatar()
Returns the avatar icon of this chat session.
|
java.lang.String |
getChatName()
Returns the name of this chat.
|
ChatSessionRenderer |
getChatSessionRenderer()
Returns the ChatSessionRenderer that provides the connection
between this chat session and its UI.
|
javax.swing.ImageIcon |
getChatStatusIcon()
Implements the ChatPanel.getChatStatusIcon method.
|
ChatTransport |
getCurrentChatTransport()
Returns the currently used transport for all operation within this chat
session.
|
java.lang.String |
getDefaultSmsNumber()
Returns the default mobile number used to send sms-es in this session.
|
java.lang.Object |
getDescriptor()
Returns the descriptor of this chat session.
|
java.util.Collection<java.lang.Object> |
getHistory(int count)
Returns a collection of the last N number of messages given by count.
|
java.util.Collection<java.lang.Object> |
getHistoryAfterDate(java.util.Date date,
int count)
Returns a collection of the last N number of messages given by count.
|
java.util.Collection<java.lang.Object> |
getHistoryBeforeDate(java.util.Date date,
int count)
Returns a collection of the last N number of messages given by count.
|
java.util.Date |
getHistoryEndDate()
Returns the end date of the history of this chat session.
|
java.util.Date |
getHistoryStartDate()
Returns the start date of the history of this chat session.
|
boolean |
isContactListSupported()
Implements ChatSession#isContactListSupported().
|
boolean |
isDescriptorPersistent()
Returns
true if this contact is persistent, otherwise
returns false . |
void |
metaContactAdded(MetaContactEvent evt)
Indicates that a MetaContact has been successfully added
to the MetaContact list.
|
void |
metaContactAvatarUpdated(MetaContactAvatarUpdateEvent evt)
Indicates that a new avatar is available for a MetaContact.
|
void |
metaContactGroupAdded(MetaContactGroupEvent evt)
Indicates that a MetaContactGroup has been successfully added
to the MetaContact list.
|
void |
metaContactGroupModified(MetaContactGroupEvent evt)
Indicates that a MetaContactGroup has been modified (e.g.
|
void |
metaContactGroupRemoved(MetaContactGroupEvent evt)
Indicates that a MetaContactGroup has been removed from the MetaContact
list.
|
void |
metaContactModified(MetaContactModifiedEvent evt)
Indicates that a MetaContact has been modified.
|
void |
metaContactMoved(MetaContactMovedEvent evt)
Indicates that a MetaContact has been moved inside the MetaContact list.
|
void |
metaContactRemoved(MetaContactEvent evt)
Indicates that a MetaContact has been removed from the MetaContact list.
|
void |
metaContactRenamed(MetaContactRenamedEvent evt)
Implements MetaContactListListener.metaContactRenamed method.
|
void |
protoContactAdded(ProtoContactEvent evt)
Implements MetaContactListListener.protoContactAdded method.
|
void |
protoContactModified(ProtoContactEvent evt)
Indicates that one of the protocol specific Contact instances
encapsulated by this MetaContact has been modified in some way.
|
void |
protoContactMoved(ProtoContactEvent evt)
Implements MetaContactListListener.protoContactMoved method.
|
void |
protoContactRemoved(ProtoContactEvent evt)
Implements MetaContactListListener.protoContactRemoved method.
|
void |
setCurrentChatTransport(ChatTransport chatTransport)
Sets the transport that will be used for all operations within this chat
session.
|
void |
setDefaultSmsNumber(java.lang.String smsPhoneNumber)
Sets the default mobile number used to send sms-es in this session.
|
addChatTransportChangeListener, findChatTransportForDescriptor, fireCurrentChatTransportChange, fireCurrentChatTransportUpdated, getChatTransports, getParticipants, getPersistableAddress, getTransportsForOperationSet, removeChatTransportChangeListener
public MetaContactChatSession(ChatSessionRenderer sessionRenderer, MetaContact metaContact, Contact protocolContact, ContactResource contactResource)
sessionRenderer
- the renderer, which gives the connection with
the UI.metaContact
- the meta contact corresponding to the session and the
protocol contact.protocolContact
- the protocol contact to be used as transport.contactResource
- the specific resource to be used as transportpublic java.lang.String getChatName()
getChatName
in class ChatSession
public java.util.Collection<java.lang.Object> getHistory(int count)
getHistory
in class ChatSession
count
- The number of messages from history to return.public java.util.Collection<java.lang.Object> getHistoryBeforeDate(java.util.Date date, int count)
getHistoryBeforeDate
in class ChatSession
date
- The date up to which we're looking for messages.count
- The number of messages from history to return.public java.util.Collection<java.lang.Object> getHistoryAfterDate(java.util.Date date, int count)
getHistoryAfterDate
in class ChatSession
date
- The date from which we're looking for messages.count
- The number of messages from history to return.public java.util.Date getHistoryStartDate()
getHistoryStartDate
in class ChatSession
public java.util.Date getHistoryEndDate()
getHistoryEndDate
in class ChatSession
public java.lang.String getDefaultSmsNumber()
getDefaultSmsNumber
in class ChatSession
public void setDefaultSmsNumber(java.lang.String smsPhoneNumber)
setDefaultSmsNumber
in class ChatSession
smsPhoneNumber
- The default mobile number used to send sms-es in
this session.public ChatTransport getCurrentChatTransport()
getCurrentChatTransport
in class ChatSession
public void setCurrentChatTransport(ChatTransport chatTransport)
setCurrentChatTransport
in class ChatSession
chatTransport
- The transport to set as a default transport for this
session.public void childContactsReordered(MetaContactGroupEvent evt)
MetaContactListListener
childContactsReordered
in interface MetaContactListListener
evt
- the MetaContactGroupEvent containing details of this
event.public void metaContactAdded(MetaContactEvent evt)
MetaContactListListener
metaContactAdded
in interface MetaContactListListener
evt
- the MetaContactListEvent containing the corresponding contactpublic void metaContactGroupAdded(MetaContactGroupEvent evt)
MetaContactListListener
metaContactGroupAdded
in interface MetaContactListListener
evt
- the MetaContactListEvent containing the corresponding contactpublic void metaContactGroupModified(MetaContactGroupEvent evt)
MetaContactListListener
metaContactGroupModified
in interface MetaContactListListener
evt
- the MetaContactListEvent containing the corresponding contactpublic void metaContactGroupRemoved(MetaContactGroupEvent evt)
MetaContactListListener
metaContactGroupRemoved
in interface MetaContactListListener
evt
- the MetaContactListEvent containing the corresponding contactpublic void metaContactModified(MetaContactModifiedEvent evt)
MetaContactListListener
metaContactModified
in interface MetaContactListListener
evt
- the MetaContactModifiedEvent containing the corresponding
contactpublic void metaContactMoved(MetaContactMovedEvent evt)
MetaContactListListener
metaContactMoved
in interface MetaContactListListener
evt
- the MetaContactListEvent containing the corresponding contactpublic void metaContactRemoved(MetaContactEvent evt)
MetaContactListListener
metaContactRemoved
in interface MetaContactListListener
evt
- the MetaContactListEvent containing the corresponding contactpublic void metaContactAvatarUpdated(MetaContactAvatarUpdateEvent evt)
MetaContactListListener
metaContactAvatarUpdated
in interface MetaContactListListener
evt
- the MetaContactAvatarUpdateEvent containing details
of this eventpublic void metaContactRenamed(MetaContactRenamedEvent evt)
metaContactRenamed
in interface MetaContactListListener
evt
- the MetaContactRenamedEvent that notified uspublic void protoContactAdded(ProtoContactEvent evt)
protoContactAdded
in interface MetaContactListListener
evt
- a reference to the corresponding
ProtoContactEventpublic void protoContactMoved(ProtoContactEvent evt)
protoContactMoved
in interface MetaContactListListener
evt
- the ProtoContactEvent that contains information about
the old and the new parent of the contactpublic void protoContactRemoved(ProtoContactEvent evt)
protoContactRemoved
in interface MetaContactListListener
evt
- a reference to the corresponding
ProtoContactEventpublic void dispose()
dispose
in class ChatSession
public ChatSessionRenderer getChatSessionRenderer()
getChatSessionRenderer
in class ChatSession
public java.lang.Object getDescriptor()
getDescriptor
in class ChatSession
public boolean isDescriptorPersistent()
true
if this contact is persistent, otherwise
returns false
.isDescriptorPersistent
in class ChatSession
true
if this contact is persistent, otherwise
returns false
.public javax.swing.ImageIcon getChatStatusIcon()
getChatStatusIcon
in class ChatSession
public byte[] getChatAvatar()
getChatAvatar
in class ChatSession
public void protoContactModified(ProtoContactEvent evt)
MetaContactListListener
protoContactModified
in interface MetaContactListListener
evt
- a reference to the corresponding
ProtoContactEventpublic boolean isContactListSupported()
isContactListSupported
in class ChatSession
ChatSession
supports a contact
list of (multiple) participants; otherwise, falsepublic void contactResourceAdded(ContactResourceEvent event)
contactResourceAdded
in interface ContactResourceListener
event
- the ContactResourceEvent that notified uspublic void contactResourceRemoved(ContactResourceEvent event)
contactResourceRemoved
in interface ContactResourceListener
event
- the ContactResourceEvent that notified uspublic void contactResourceModified(ContactResourceEvent event)
contactResourceModified
in interface ContactResourceListener
event
- the ContactResourceEvent that notified us
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.