Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol
Interface OperationSetTypingNotifications

All Superinterfaces:
OperationSet
All Known Implementing Classes:
AbstractOperationSetTypingNotifications, OperationSetTypingNotificationsGibberishImpl, OperationSetTypingNotificationsIcqImpl, OperationSetTypingNotificationsJabberImpl, OperationSetTypingNotificationsMsnImpl, OperationSetTypingNotificationsSipImpl, OperationSetTypingNotificationsYahooImpl, OperationSetTypingNotificationsZeroconfImpl

public interface OperationSetTypingNotifications
extends OperationSet

The operation set allows user bundles (e.g. the user interface) to send and receive typing notifications to and from other Contacts.

An important thing of typing notifications is that they do not have the purpose of being relibable.

Author:
Emil Ivov

Field Summary
static int STATE_PAUSED
          Indicates that a source contact had been typing a message to us but has just paused.
static int STATE_STALE
          Indicates that the typing state of a source contact has not been updated for a while and is currently stale.
static int STATE_STOPPED
          Indicates that a source contact had been typing a message to us but has stopped a while ago.
static int STATE_TYPING
          Indicates that a source contact is currently typing a message to us.
static int STATE_UNKNOWN
          Indicates that the typing state of a source contact is not currently known.
 
Method Summary
 void addTypingNotificationsListener(TypingNotificationsListener l)
          Adds l to the list of listeners registered for receiving TypingNotificationEvents
 void removeTypingNotificationsListener(TypingNotificationsListener l)
          Removes l from the list of listeners registered for receiving TypingNotificationEvents
 void sendTypingNotification(Contact notifiedContact, int typingState)
          Sends a notification to notifiedContatct that we have entered typingState.
 

Field Detail

STATE_UNKNOWN

static final int STATE_UNKNOWN
Indicates that the typing state of a source contact is not currently known. You should not normally received events carrying such a state.

See Also:
Constant Field Values

STATE_TYPING

static final int STATE_TYPING
Indicates that a source contact is currently typing a message to us.

See Also:
Constant Field Values

STATE_STALE

static final int STATE_STALE
Indicates that the typing state of a source contact has not been updated for a while and is currently stale.

See Also:
Constant Field Values

STATE_PAUSED

static final int STATE_PAUSED
Indicates that a source contact had been typing a message to us but has just paused.

See Also:
Constant Field Values

STATE_STOPPED

static final int STATE_STOPPED
Indicates that a source contact had been typing a message to us but has stopped a while ago.

See Also:
Constant Field Values
Method Detail

addTypingNotificationsListener

void addTypingNotificationsListener(TypingNotificationsListener l)
Adds l to the list of listeners registered for receiving TypingNotificationEvents

Parameters:
l - the TypingNotificationsListener listener that we'd like to add

removeTypingNotificationsListener

void removeTypingNotificationsListener(TypingNotificationsListener l)
Removes l from the list of listeners registered for receiving TypingNotificationEvents

Parameters:
l - the TypingNotificationsListener listener that we'd like to remove

sendTypingNotification

void sendTypingNotification(Contact notifiedContact,
                            int typingState)
                            throws IllegalStateException,
                                   IllegalArgumentException
Sends a notification to notifiedContatct that we have entered typingState.

Parameters:
notifiedContact - the Contact to notify
typingState - the typing state that we have entered.
Throws:
IllegalStateException - if the underlying ICQ stack is not registered and initialized.
IllegalArgumentException - if notifiedContact is not an instance belonging to the underlying implementation.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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