Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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

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

public class TypingNotificationEvent
extends EventObject

TypingNotificationEvents are delievered upon reception of a corresponding message from a remote contact. TypingNotificationEvents contain a state id, identifying the exact typing event that has occurrend (a user has started or stopped typing at us), the source Contact that generated the event and others.

Author:
Emil Ivov
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
TypingNotificationEvent(Contact sourceContact, int state)
          Creats a TypingNotificationEvent with the specified parameters.
 
Method Summary
 Contact getSourceContact()
          Returns a reference to the Contact that has sent this event.
 int getTypingState()
          Returns the typing state that this TypingNotificationEvent is carrying.
 String toString()
          Returns a String representation of this EventObject.
 
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
 

Constructor Detail

TypingNotificationEvent

public TypingNotificationEvent(Contact sourceContact,
                               int state)
Creats a TypingNotificationEvent with the specified parameters.

Parameters:
sourceContact - the Contact that has sen the notification.
state -
Method Detail

getTypingState

public int getTypingState()
Returns the typing state that this TypingNotificationEvent is carrying.

Returns:
one of the STATE_XXX ints indicating the typing state that this notification is about.

getSourceContact

public Contact getSourceContact()
Returns a reference to the Contact that has sent this event.

Returns:
a reference to the Contact whose typing state we're being notified about.

toString

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

Overrides:
toString in class EventObject
Returns:
A a String representation of this EventObject.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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