Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.jabber
Class OperationSetTypingNotificationsJabberImpl

java.lang.Object
  extended by net.java.sip.communicator.service.protocol.AbstractOperationSetTypingNotifications<ProtocolProviderServiceJabberImpl>
      extended by net.java.sip.communicator.impl.protocol.jabber.OperationSetTypingNotificationsJabberImpl
All Implemented Interfaces:
OperationSet, OperationSetTypingNotifications

public class OperationSetTypingNotificationsJabberImpl
extends AbstractOperationSetTypingNotifications<ProtocolProviderServiceJabberImpl>

Maps SIP Communicator typing notifications to those going and coming from smack lib.

Author:
Damian Minkov, Emil Ivov

Field Summary
 
Fields inherited from class net.java.sip.communicator.service.protocol.AbstractOperationSetTypingNotifications
parentProvider
 
Fields inherited from interface net.java.sip.communicator.service.protocol.OperationSetTypingNotifications
STATE_PAUSED, STATE_STALE, STATE_STOPPED, STATE_TYPING, STATE_UNKNOWN
 
Constructor Summary
OperationSetTypingNotificationsJabberImpl(ProtocolProviderServiceJabberImpl provider)
           
 
Method Summary
protected  void assertConnected()
          Utility method throwing an exception if the stack is not properly initialized.
 void sendTypingNotification(Contact notifiedContact, int typingState)
          Sends a notification to notifiedContatct that we have entered typingState.
 
Methods inherited from class net.java.sip.communicator.service.protocol.AbstractOperationSetTypingNotifications
addTypingNotificationsListener, fireTypingNotificationsEvent, removeTypingNotificationsListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationSetTypingNotificationsJabberImpl

OperationSetTypingNotificationsJabberImpl(ProtocolProviderServiceJabberImpl provider)
Parameters:
provider - a ref to the ProtocolProviderServiceImpl that created us and that we'll use for retrieving the underlying aim connection.
Method Detail

sendTypingNotification

public 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 stack is not registered and initialized.
IllegalArgumentException - if notifiedContact is not an instance belonging to the underlying implementation.

assertConnected

protected void assertConnected()
                        throws IllegalStateException
Utility method throwing an exception if the stack is not properly initialized.

Overrides:
assertConnected in class AbstractOperationSetTypingNotifications<ProtocolProviderServiceJabberImpl>
Throws:
IllegalStateException - if the underlying stack is not registered and initialized.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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