Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol.event
Class AdHocChatRoomParticipantPresenceChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.java.sip.communicator.service.protocol.event.AdHocChatRoomParticipantPresenceChangeEvent
All Implemented Interfaces:
Serializable

public class AdHocChatRoomParticipantPresenceChangeEvent
extends EventObject

Dispatched to notify interested parties that a change in the presence of an ad-hoc chat room participant has occurred. Changes may include the participant being join, left...

Author:
Valentin Martinet
See Also:
Serialized Form

Field Summary
static String CONTACT_JOINED
          Indicates that this event was triggered as a result of the participant joining the source ad-hoc chat room.
static String CONTACT_LEFT
          Indicates that this event was triggered as a result of the participant leaving the source ad-hoc chat room.
static String CONTACT_QUIT
          Indicates that this event was triggered as a result of the participant being disconnected from the server brutally, or due to a ping timeout.
static String REASON_USER_LIST
          The well-known reason for a AdHocChatRoomParticipantPresenceChangeEvent to occur as part of an operation which lists all users in an AdHocChatRoom.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
AdHocChatRoomParticipantPresenceChangeEvent(AdHocChatRoom sourceAdHocRoom, Contact sourceParticipant, String eventType, String reason)
          Creates an AdHocChatRoomParticipantPresenceChangeEvent representing that a change in the presence of an Contact has occurred.
 
Method Summary
 AdHocChatRoom getAdHocChatRoom()
          Returns the ad-hoc chat room that produced this event.
 String getEventType()
          Returns the type of this event which could be one of the MEMBER_XXX member field values.
 Contact getParticipant()
          Returns the participant that this event is about.
 String getReason()
          A reason String indicating a human readable reason for this event.
 boolean isReasonUserList()
          Gets the indicator which determines whether this event has occurred with the well-known reason of listing all users in a ChatRoom.
 String toString()
          Returns a String representation of this event.
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONTACT_JOINED

public static final String CONTACT_JOINED
Indicates that this event was triggered as a result of the participant joining the source ad-hoc chat room.

See Also:
Constant Field Values

CONTACT_LEFT

public static final String CONTACT_LEFT
Indicates that this event was triggered as a result of the participant leaving the source ad-hoc chat room.

See Also:
Constant Field Values

CONTACT_QUIT

public static final String CONTACT_QUIT
Indicates that this event was triggered as a result of the participant being disconnected from the server brutally, or due to a ping timeout.

See Also:
Constant Field Values

REASON_USER_LIST

public static final String REASON_USER_LIST
The well-known reason for a AdHocChatRoomParticipantPresenceChangeEvent to occur as part of an operation which lists all users in an AdHocChatRoom.

See Also:
Constant Field Values
Constructor Detail

AdHocChatRoomParticipantPresenceChangeEvent

public AdHocChatRoomParticipantPresenceChangeEvent(AdHocChatRoom sourceAdHocRoom,
                                                   Contact sourceParticipant,
                                                   String eventType,
                                                   String reason)
Creates an AdHocChatRoomParticipantPresenceChangeEvent representing that a change in the presence of an Contact has occurred. Changes may include the participant being join, left, etc.

Parameters:
sourceAdHocRoom - the AdHocChatRoom that produced this event
sourceParticipant - the Contact that this event is about
eventType - the event type; one of the CONTACT_XXX constants
reason - the reason explaining why this event might have occurred
Method Detail

getAdHocChatRoom

public AdHocChatRoom getAdHocChatRoom()
Returns the ad-hoc chat room that produced this event.

Returns:
the AdHocChatRoom that produced this event

getParticipant

public Contact getParticipant()
Returns the participant that this event is about.

Returns:
the Contact that this event is about.

getReason

public String getReason()
A reason String indicating a human readable reason for this event.

Returns:
a human readable String containing the reason for this event, or null if no particular reason was specified.

isReasonUserList

public boolean isReasonUserList()
Gets the indicator which determines whether this event has occurred with the well-known reason of listing all users in a ChatRoom.

Returns:
true if this event has occurred with the well-known reason of listing all users in a ChatRoom i.e. getReason() returns a value of REASON_USER_LIST; otherwise, false

getEventType

public String getEventType()
Returns the type of this event which could be one of the MEMBER_XXX member field values.

Returns:
one of the MEMBER_XXX member field values indicating the type of this event.

toString

public String toString()
Returns a String representation of this event.

Overrides:
toString in class EventObject
Returns:
string representation of this event

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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