public class OperationSetTypingNotificationsSipImpl extends AbstractOperationSetTypingNotifications<ProtocolProviderServiceSipImpl> implements SipMessageProcessor, MessageListener
parentProvider
STATE_PAUSED, STATE_STALE, STATE_STOPPED, STATE_TYPING, STATE_UNKNOWN
Constructor and Description |
---|
OperationSetTypingNotificationsSipImpl(ProtocolProviderServiceSipImpl provider,
OperationSetBasicInstantMessagingSipImpl opSetBasicIm)
Creates an instance of this operation set.
|
Modifier and Type | Method and Description |
---|---|
void |
messageDelivered(MessageDeliveredEvent evt)
Called when the underlying implementation has received an indication
that a message, sent earlier has been successfully received by the
destination.
|
void |
messageDeliveryFailed(MessageDeliveryFailedEvent evt)
Called to indicated that delivery of a message sent earlier has failed.
|
void |
messageReceived(MessageReceivedEvent evt)
When a message is delivered fire that typing has stopped.
|
boolean |
processMessage(javax.sip.RequestEvent requestEvent)
Process the incoming sip messages
|
boolean |
processResponse(javax.sip.ResponseEvent responseEvent,
java.util.Map<java.lang.String,Message> sentMsg)
Process the responses of sent messages
|
boolean |
processTimeout(javax.sip.TimeoutEvent timeoutEvent,
java.util.Map<java.lang.String,Message> sentMessages)
Process the timeouts of sent messages
|
void |
sendTypingNotification(Contact to,
int typingState)
Sends a notification to notifiedContatct that we have entered
typingState.
|
(package private) void |
shutdown()
Frees allocated resources.
|
addTypingNotificationsListener, assertConnected, fireTypingNotificationsDeliveryFailedEvent, fireTypingNotificationsEvent, removeTypingNotificationsListener
OperationSetTypingNotificationsSipImpl(ProtocolProviderServiceSipImpl provider, OperationSetBasicInstantMessagingSipImpl opSetBasicIm)
provider
- a ref to the ProtocolProviderServiceImpl
that created us and that we'll use for retrieving the underlying aim
connection.opSetBasicIm
- the parent instant messaging operation set.public boolean processMessage(javax.sip.RequestEvent requestEvent)
processMessage
in interface SipMessageProcessor
requestEvent
- the incoming event holding the messagepublic boolean processResponse(javax.sip.ResponseEvent responseEvent, java.util.Map<java.lang.String,Message> sentMsg)
processResponse
in interface SipMessageProcessor
responseEvent
- the incoming event holding the responsesentMsg
- map containing sent messagespublic boolean processTimeout(javax.sip.TimeoutEvent timeoutEvent, java.util.Map<java.lang.String,Message> sentMessages)
processTimeout
in interface SipMessageProcessor
timeoutEvent
- the event holding the requestsentMessages
- map containing sent messagespublic void sendTypingNotification(Contact to, int typingState) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
OperationSetTypingNotifications
sendTypingNotification
in interface OperationSetTypingNotifications
to
- the Contact to notifytypingState
- the typing state that we have entered.java.lang.IllegalStateException
- if the underlying ICQ stack is
not registered and initialized.java.lang.IllegalArgumentException
- if notifiedContact is
not an instance belonging to the underlying implementation.public void messageReceived(MessageReceivedEvent evt)
messageReceived
in interface MessageListener
evt
- the received message eventpublic void messageDelivered(MessageDeliveredEvent evt)
MessageListener
messageDelivered
in interface MessageListener
evt
- the MessageDeliveredEvent containing the id of the message
that has caused the event.public void messageDeliveryFailed(MessageDeliveryFailedEvent evt)
MessageListener
messageDeliveryFailed
in interface MessageListener
evt
- the MessageFailedEvent containing the ID of the
message whose delivery has failed.void shutdown()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.