public abstract class ChatSession
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
chatHistoryFilter
The chat history filter.
|
protected java.util.List<ChatContact<?>> |
chatParticipants
The list of ChatContacts contained in this chat session.
|
protected java.util.List<ChatTransport> |
chatTransports
The list of ChatTransports available in this session.
|
protected java.lang.String |
persistableAddress
The persistable address of the contact from the session.
|
Constructor and Description |
---|
ChatSession() |
Modifier and Type | Method and Description |
---|---|
void |
addChatTransportChangeListener(ChatSessionChangeListener l)
Adds the given
ChatSessionChangeListener to this
ChatSession. |
abstract void |
dispose()
Disposes this chat session.
|
ChatTransport |
findChatTransportForDescriptor(java.lang.Object descriptor,
java.lang.String resourceName)
Returns the ChatTransport corresponding to the given descriptor.
|
void |
fireCurrentChatTransportChange()
Fires a event that current ChatTransport has changed.
|
void |
fireCurrentChatTransportUpdated(int eventID)
Fires a event that current ChatTransport has been updated.
|
abstract byte[] |
getChatAvatar()
Returns the avatar icon of this chat session.
|
abstract java.lang.String |
getChatName()
Returns the name of the chat.
|
abstract ChatSessionRenderer |
getChatSessionRenderer()
Returns the ChatSessionRenderer that provides the connection
between this chat session and its UI.
|
abstract javax.swing.ImageIcon |
getChatStatusIcon()
Returns the status icon of this chat session.
|
java.util.Iterator<ChatTransport> |
getChatTransports()
Returns all available chat transports for this chat session.
|
abstract ChatTransport |
getCurrentChatTransport()
Returns the currently used transport for all operation within this chat
session.
|
abstract java.lang.String |
getDefaultSmsNumber()
Returns the default mobile number used to send sms-es in this session.
|
abstract java.lang.Object |
getDescriptor()
Returns the descriptor of this chat session.
|
abstract java.util.Collection<java.lang.Object> |
getHistory(int count)
Returns a collection of the last N number of history messages given by
count.
|
abstract java.util.Collection<java.lang.Object> |
getHistoryAfterDate(java.util.Date date,
int count)
Returns a collection of the last N number of history messages given by
count.
|
abstract java.util.Collection<java.lang.Object> |
getHistoryBeforeDate(java.util.Date date,
int count)
Returns a collection of the last N number of history messages given by
count.
|
abstract java.util.Date |
getHistoryEndDate()
Returns the end date of the history of this chat session.
|
abstract java.util.Date |
getHistoryStartDate()
Returns the start date of the history of this chat session.
|
java.util.Iterator<ChatContact<?>> |
getParticipants()
Returns an iterator to the list of all participants contained in this
chat session.
|
java.lang.String |
getPersistableAddress()
Returns the persistable address of the contact from the session.
|
java.util.List<ChatTransport> |
getTransportsForOperationSet(java.lang.Class<? extends OperationSet> opSetClass)
Returns a list of all ChatTransports contained in this session
supporting the given opSetClass.
|
abstract boolean |
isContactListSupported()
Gets the indicator which determines whether a contact list of (multiple)
participants is supported by this
ChatSession . |
abstract boolean |
isDescriptorPersistent()
Returns
true if this chat session descriptor is persistent,
otherwise returns false . |
void |
removeChatTransportChangeListener(ChatSessionChangeListener l)
Removes the given
ChatSessionChangeListener to this
ChatSession. |
abstract void |
setCurrentChatTransport(ChatTransport chatTransport)
Sets the transport that will be used for all operations within this chat
session.
|
abstract void |
setDefaultSmsNumber(java.lang.String smsPhoneNumber)
Sets the default mobile number used to send sms-es in this session.
|
protected final java.lang.String[] chatHistoryFilter
protected final java.util.List<ChatContact<?>> chatParticipants
protected final java.util.List<ChatTransport> chatTransports
protected java.lang.String persistableAddress
public abstract java.lang.Object getDescriptor()
public java.lang.String getPersistableAddress()
public abstract boolean isDescriptorPersistent()
true
if this chat session descriptor is persistent,
otherwise returns false
.true
if this chat session descriptor is persistent,
otherwise returns false
.public java.util.Iterator<ChatContact<?>> getParticipants()
public java.util.Iterator<ChatTransport> getChatTransports()
public abstract ChatTransport getCurrentChatTransport()
public java.util.List<ChatTransport> getTransportsForOperationSet(java.lang.Class<? extends OperationSet> opSetClass)
opSetClass
- the OperationSet class we're looking forpublic abstract ChatSessionRenderer getChatSessionRenderer()
public abstract void setCurrentChatTransport(ChatTransport chatTransport)
chatTransport
- The transport to set as a default transport for this
session.public abstract java.lang.String getChatName()
public abstract java.util.Collection<java.lang.Object> getHistory(int count)
count
- The number of messages from history to return.public abstract java.util.Collection<java.lang.Object> getHistoryBeforeDate(java.util.Date date, int count)
date
- The date up to which we're looking for messages.count
- The number of messages from history to return.public abstract java.util.Collection<java.lang.Object> getHistoryAfterDate(java.util.Date date, int count)
date
- The date from which we're looking for messages.count
- The number of messages from history to return.public abstract java.util.Date getHistoryStartDate()
public abstract java.util.Date getHistoryEndDate()
public abstract java.lang.String getDefaultSmsNumber()
public abstract void setDefaultSmsNumber(java.lang.String smsPhoneNumber)
smsPhoneNumber
- The default mobile number used to send sms-es in
this session.public abstract void dispose()
public ChatTransport findChatTransportForDescriptor(java.lang.Object descriptor, java.lang.String resourceName)
descriptor
- The descriptor of the chat transport we're looking for.resourceName
- The name of the resource if any, null otherwisepublic abstract javax.swing.ImageIcon getChatStatusIcon()
public abstract byte[] getChatAvatar()
public abstract boolean isContactListSupported()
ChatSession
. For example,
UI implementations may use the indicator to determine whether UI elements
should be created for the user to represent the contact list of the
participants in this ChatSession
.ChatSession
supports a contact
list of (multiple) participants; otherwise, falsepublic void addChatTransportChangeListener(ChatSessionChangeListener l)
ChatSessionChangeListener
to this
ChatSession.l
- the ChatSessionChangeListener to addpublic void removeChatTransportChangeListener(ChatSessionChangeListener l)
ChatSessionChangeListener
to this
ChatSession.l
- the ChatSessionChangeListener to addpublic void fireCurrentChatTransportChange()
public void fireCurrentChatTransportUpdated(int eventID)
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.