com.beem.project.beem.service
Class BeemChatManager

Package class diagram package BeemChatManager
java.lang.Object
  extended by android.os.Binder
      extended by com.beem.project.beem.service.aidl.IChatManager.Stub
          extended by com.beem.project.beem.service.BeemChatManager
All Implemented Interfaces:
IBinder, IInterface, IChatManager

public class BeemChatManager
extends IChatManager.Stub

An adapter for smack's ChatManager. This class provides functionnality to handle chats.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.beem.project.beem.service.aidl.IChatManager
IChatManager.Stub
 
Nested classes/interfaces inherited from interface android.os.IBinder
IBinder.DeathRecipient
 
Field Summary
 
Fields inherited from interface android.os.IBinder
DUMP_TRANSACTION, FIRST_CALL_TRANSACTION, FLAG_ONEWAY, INTERFACE_TRANSACTION, LAST_CALL_TRANSACTION, PING_TRANSACTION
 
Constructor Summary
BeemChatManager(ChatManager chatManager, BeemService service, Roster roster)
          Constructor.
 
Method Summary
 void addChatCreationListener(IChatManagerListener listener)
          Register a callback to call when a new chat session is created.
 IChat createChat(Contact contact, IMessageListener listener)
          Create a chat session.
 IChat createChat(String jid, IMessageListener listener)
          Create a chat session.
 void deleteChatNotification(IChat chat)
          
 void destroyChat(IChat chat)
          Destroy a chat session with a contact.
 ChatAdapter getChat(Contact contact)
          Get an existing Chat session with a contact.
 List<Contact> getOpenedChatList()
          This methods permits to retrieve the list of contacts who have an opened chat session with us.
 void removeChatCreationListener(IChatManagerListener listener)
          Remove a callback for the creation of new chat session.
 
Methods inherited from class com.beem.project.beem.service.aidl.IChatManager.Stub
asBinder, asInterface, onTransact
 
Methods inherited from class android.os.Binder
attachInterface, clearCallingIdentity, dump, dump, finalize, flushPendingCommands, getCallingPid, getCallingUid, getInterfaceDescriptor, isBinderAlive, joinThreadPool, linkToDeath, pingBinder, queryLocalInterface, restoreCallingIdentity, transact, unlinkToDeath
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeemChatManager

public BeemChatManager(ChatManager chatManager,
                       BeemService service,
                       Roster roster)
Constructor.

Parameters:
chatManager - the smack ChatManager to adapt
service - the service which runs the chat manager
roster - roster used to get presences changes
Method Detail

addChatCreationListener

public void addChatCreationListener(IChatManagerListener listener)
                             throws RemoteException
Description copied from interface: IChatManager
Register a callback to call when a new chat session is created.

Parameters:
listener - the callback to add
Throws:
RemoteException

createChat

public IChat createChat(Contact contact,
                        IMessageListener listener)
Create a chat session.

Parameters:
contact - the contact you want to chat with
listener - listener to use for chat events on this chat session
Returns:
the chat session

createChat

public IChat createChat(String jid,
                        IMessageListener listener)
Create a chat session.

Parameters:
jid - the jid of the contact you want to chat with
listener - listener to use for chat events on this chat session
Returns:
the chat session

destroyChat

public void destroyChat(IChat chat)
                 throws RemoteException
Destroy a chat session with a contact.

Parameters:
chat - the chat session
Throws:
RemoteException

deleteChatNotification

public void deleteChatNotification(IChat chat)

Parameters:
chat - the chat.

getChat

public ChatAdapter getChat(Contact contact)
Description copied from interface: IChatManager
Get an existing Chat session with a contact.

Returns:
null if the chat session does not exist.

getOpenedChatList

public List<Contact> getOpenedChatList()
                                throws RemoteException
This methods permits to retrieve the list of contacts who have an opened chat session with us.

Returns:
An List containing Contact instances.
Throws:
RemoteException - If a Binder remote-invocation error occurred.

removeChatCreationListener

public void removeChatCreationListener(IChatManagerListener listener)
                                throws RemoteException
Remove a callback for the creation of new chat session.

Parameters:
listener - the callback to remove.
Throws:
RemoteException


Copyright © 2009 Beem-project.com. All Rights Reserved.