Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.irc
Class ChatRoomMemberIrcImpl

java.lang.Object
  extended by net.java.sip.communicator.impl.protocol.irc.ChatRoomMemberIrcImpl
All Implemented Interfaces:
ChatRoomMember

public class ChatRoomMemberIrcImpl
extends Object
implements ChatRoomMember

Represents a chat room member.

Author:
Stephane Remy, Lubomir Marinov

Constructor Summary
ChatRoomMemberIrcImpl(ProtocolProviderServiceIrcImpl parentProvider, ChatRoom chatRoom, String contactID, ChatRoomMemberRole chatRoomMemberRole)
          Creates an instance of ChatRoomMemberIrcImpl, by specifying the protocol provider, the corresponding chat room, where this member is joined, the identifier of the contact (the nickname), the login, the host name and finally the role that this contact has in the chat room.
 
Method Summary
 byte[] getAvatar()
          Returns null to indicate that there's no avatar attached to the IRC member.
 ChatRoom getChatRoom()
          Returns the chat room that this member is participating in.
 Contact getContact()
          Returns null to indicate that there's no contact corresponding to the IRC member.
 String getContactAddress()
          Returns the contact identifier representing this contact.
 String getName()
          Returns the name of this member as it is known in its containing chat room (i.e.
 ProtocolProviderService getProtocolProvider()
          Returns the protocol provider instance that this member has originated in.
 ChatRoomMemberRole getRole()
          Returns the role of this chat room member in its containing room.
 void setRole(ChatRoomMemberRole chatRoomMemberRole)
          Sets a new member role to this ChatRoomMember.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChatRoomMemberIrcImpl

public ChatRoomMemberIrcImpl(ProtocolProviderServiceIrcImpl parentProvider,
                             ChatRoom chatRoom,
                             String contactID,
                             ChatRoomMemberRole chatRoomMemberRole)
Creates an instance of ChatRoomMemberIrcImpl, by specifying the protocol provider, the corresponding chat room, where this member is joined, the identifier of the contact (the nickname), the login, the host name and finally the role that this contact has in the chat room.

Parameters:
parentProvider - the protocol provider, to which the corresponding chat room belongs
chatRoom - the chat room, where this member is joined
contactID - the nickname of the member
chatRoomMemberRole - the role that this member has in the corresponding chat room
Method Detail

getChatRoom

public ChatRoom getChatRoom()
Returns the chat room that this member is participating in.

Specified by:
getChatRoom in interface ChatRoomMember
Returns:
the ChatRoom instance that this member belongs to.

getProtocolProvider

public ProtocolProviderService getProtocolProvider()
Returns the protocol provider instance that this member has originated in.

Specified by:
getProtocolProvider in interface ChatRoomMember
Returns:
the ProtocolProviderService instance that created this member and its containing chat room

getContactAddress

public String getContactAddress()
Returns the contact identifier representing this contact. For IRC this method returns the same as getName().

Specified by:
getContactAddress in interface ChatRoomMember
Returns:
a String (contact address), uniquely representing the contact over the service being used by the associated protocol provider instance/

getName

public String getName()
Returns the name of this member as it is known in its containing chat room (i.e. a nickname). The name returned by this method, may sometimes match the string returned by getContactID() which is actually the address of a contact in the realm of the corresponding protocol.

Specified by:
getName in interface ChatRoomMember
Returns:
the name of this member as it is known in the containing chat room (i.e. a nickname).

getRole

public ChatRoomMemberRole getRole()
Returns the role of this chat room member in its containing room.

Specified by:
getRole in interface ChatRoomMember
Returns:
a ChatRoomMemberRole instance indicating the role the this member in its containing chat room.

setRole

public void setRole(ChatRoomMemberRole chatRoomMemberRole)
Sets a new member role to this ChatRoomMember.

Specified by:
setRole in interface ChatRoomMember
Parameters:
chatRoomMemberRole - the role to be set

getAvatar

public byte[] getAvatar()
Returns null to indicate that there's no avatar attached to the IRC member.

Specified by:
getAvatar in interface ChatRoomMember
Returns:
null

getContact

public Contact getContact()
Returns null to indicate that there's no contact corresponding to the IRC member.

Specified by:
getContact in interface ChatRoomMember
Returns:
null

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.