com.skype
Class Chat

java.lang.Object
  extended by com.skype.Chat
All Implemented Interfaces:
Serializable

public final class Chat
extends Object

object representing Skype CHAT object.

Author:
Koji Hisano.
See Also:
https://developer.skype.com/Docs/ApiDoc/CHAT_object, Serialized Form

Nested Class Summary
static class Chat.Status
          Enumeration of the status of CHAT object.
 
Method Summary
 void addUser(User addedUser)
          Add a User to this CHAT.
 void addUsers(User[] addedUsers)
          Add several users to this CHAT.
 boolean equals(Object compared)
          Implement a equals check for CHAT objects based on their ID's.
 User getAdder()
          Return user who added the current user to chat.
 User[] getAllActiveMembers()
          Return all active members of CHAT.
 ChatMessage[] getAllChatMessages()
          Return all messages posted in this CHAT.
 User[] getAllMembers()
          Return all users in this CHAT.
 User[] getAllPosters()
          Return all chatting members on this CHAT.
 Object getData(String name)
          Returns the user data to which this object maps to the specified by the name.
 String getDescription()
          Get the topic name of this chat.
 String getId()
          Return the ID of this CHAT object.
 ChatMessage[] getRecentChatMessages()
          Get the most recent chatmessages for this CHAT.
 Chat.Status getStatus()
          Return the status of this CHAT.
 Date getTime()
          Return the timestamp of this CHAT.
 String getWindowTitle()
          Get the friendly name of this chat.
 int hashCode()
          Return the hashcode of this CHAT object.
 boolean isBookmarked()
          Indicates if this chat has been bookmarked.
 void leave()
          Leave this CHAT.
 ChatMessage send(String message)
          Send a message to this CHAT.
 void setData(String name, Object userData)
          Associates the specified user data with the specified name in this object.
 void setTopic(String newValue)
          Set the topic of this CHAT.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hashCode

public int hashCode()
Return the hashcode of this CHAT object.

Overrides:
hashCode in class Object
Returns:
ID.

equals

public boolean equals(Object compared)
Implement a equals check for CHAT objects based on their ID's.

Overrides:
equals in class Object
Parameters:
compared - The object to compare to.
Returns:
true when objects are equal.

getId

public String getId()
Return the ID of this CHAT object.

Returns:
the ID.

setTopic

public void setTopic(String newValue)
              throws SkypeException
Set the topic of this CHAT.

Parameters:
newValue - The new topic.
Throws:
SkypeException - when the connection has gone bad.

addUser

public void addUser(User addedUser)
             throws SkypeException
Add a User to this CHAT.

Parameters:
addedUser - the user to add.
Throws:
SkypeException - when connection has gone bad.

addUsers

public void addUsers(User[] addedUsers)
              throws SkypeException
Add several users to this CHAT.

Parameters:
addedUsers - Users to add.
Throws:
SkypeException - when the connection has gone bad.

leave

public void leave()
           throws SkypeException
Leave this CHAT.

Throws:
SkypeException - when the connection has gone bad.

getAllChatMessages

public ChatMessage[] getAllChatMessages()
                                 throws SkypeException
Return all messages posted in this CHAT.

Returns:
array of messages.
Throws:
SkypeException - when connection has gone bad.

getRecentChatMessages

public ChatMessage[] getRecentChatMessages()
                                    throws SkypeException
Get the most recent chatmessages for this CHAT.

Returns:
array of recent chatmessages.
Throws:
SkypeException - when conenction is gone bad.

send

public ChatMessage send(String message)
                 throws SkypeException
Send a message to this CHAT.

Parameters:
message - the message to send.
Returns:
the newly created message which has been sent.
Throws:
SkypeException - when the connection has gone bad.

getTime

public Date getTime()
             throws SkypeException
Return the timestamp of this CHAT.

Returns:
date of this CHAT.
Throws:
SkypeException - when the connection has gone bad.

getAdder

public User getAdder()
              throws SkypeException
Return user who added the current user to chat.

Returns:
User who added us.
Throws:
SkypeException - when connection has gone bad.

getStatus

public Chat.Status getStatus()
                      throws SkypeException
Return the status of this CHAT.

Returns:
chat status.
Throws:
SkypeException - when the connection has gone bad.

getWindowTitle

public String getWindowTitle()
                      throws SkypeException
Get the friendly name of this chat.

Returns:
friendly name of this chat.
Throws:
SkypeException - when the connection has gone bad.

getDescription

public String getDescription()
                      throws SkypeException
Get the topic name of this chat.

Returns:
topic name of this chat.
Throws:
SkypeException - when the connection has gone bad.

getAllPosters

public User[] getAllPosters()
                     throws SkypeException
Return all chatting members on this CHAT.

Returns:
array of chatting users.
Throws:
SkypeException - when connection has gone bad.

getAllMembers

public User[] getAllMembers()
                     throws SkypeException
Return all users in this CHAT.

Returns:
array of members.
Throws:
SkypeException - when connection has gone bad.

getAllActiveMembers

public User[] getAllActiveMembers()
                           throws SkypeException
Return all active members of CHAT.

Returns:
array of active Users.
Throws:
SkypeException - when connection has gone bad.

isBookmarked

public boolean isBookmarked()
                     throws SkypeException
Indicates if this chat has been bookmarked.

Returns:
true if this chat is bookmarked
Throws:
SkypeException - when the connection has gone bad.

getData

public final Object getData(String name)
Returns the user data to which this object maps to the specified by the name. Returns null if this object contains no mapping for the name.

Parameters:
name - name whose associated user data is to be returned.
Returns:
the user data to which this object maps the specified name, or null if this object contains no mapping for the name.
See Also:
Map.get(Object)

setData

public final void setData(String name,
                          Object userData)
Associates the specified user data with the specified name in this object.

Parameters:
name - name with which the specified user data is to be associated.
userData - user data to be associated with the specified name.
See Also:
Map.put(Object, Object)


Copyright © 2004-2011. All Rights Reserved.