T
- the type of the ProtocolProviderService implementation
providing the AbstractOperationSetTypingNotifications implementationpublic abstract class AbstractOperationSetTypingNotifications<T extends ProtocolProviderService> extends java.lang.Object implements OperationSetTypingNotifications
Modifier and Type | Field and Description |
---|---|
protected T |
parentProvider
The provider that created us.
|
STATE_PAUSED, STATE_STALE, STATE_STOPPED, STATE_TYPING, STATE_UNKNOWN
Modifier | Constructor and Description |
---|---|
protected |
AbstractOperationSetTypingNotifications(T parentProvider)
Initializes a new AbstractOperationSetTypingNotifications
instance created by a specific ProtocolProviderService instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addTypingNotificationsListener(TypingNotificationsListener listener)
Adds listener to the list of listeners registered for receiving
TypingNotificationEvents.
|
protected void |
assertConnected()
Utility method throwing an exception if the stack is not properly
initialized.
|
void |
fireTypingNotificationsDeliveryFailedEvent(Contact sourceContact,
int evtCode)
Delivers a TypingNotificationEvent to all registered listeners
for delivery failed event.
|
void |
fireTypingNotificationsEvent(Contact sourceContact,
int evtCode)
Delivers a TypingNotificationEvent to all registered listeners.
|
void |
removeTypingNotificationsListener(TypingNotificationsListener listener)
Removes listener from the list of listeners registered for
receiving TypingNotificationEvents.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
sendTypingNotification
protected final T extends ProtocolProviderService parentProvider
protected AbstractOperationSetTypingNotifications(T parentProvider)
parentProvider
- the ProtocolProviderService which creates
the new instancepublic void addTypingNotificationsListener(TypingNotificationsListener listener)
addTypingNotificationsListener
in interface OperationSetTypingNotifications
listener
- the TypingNotificationsListener listener that
we'd like to addOperationSetTypingNotifications.addTypingNotificationsListener(
TypingNotificationsListener)
protected void assertConnected() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if the underlying stack is not registered
and initializedpublic void fireTypingNotificationsEvent(Contact sourceContact, int evtCode)
sourceContact
- the contact who has sent the notificationevtCode
- the code of the event to deliverpublic void fireTypingNotificationsDeliveryFailedEvent(Contact sourceContact, int evtCode)
sourceContact
- the contact who has sent the notificationevtCode
- the code of the event to deliverpublic void removeTypingNotificationsListener(TypingNotificationsListener listener)
removeTypingNotificationsListener
in interface OperationSetTypingNotifications
listener
- the TypingNotificationsListener listener that
we'd like to removeOperationSetTypingNotifications.removeTypingNotificationsListener(
TypingNotificationsListener)
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.