Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.plugin.chatalerter
Class ChatAlerterActivator

java.lang.Object
  extended by net.java.sip.communicator.plugin.chatalerter.ChatAlerterActivator
All Implemented Interfaces:
EventListener, AdHocChatRoomMessageListener, ChatRoomMessageListener, LocalUserAdHocChatRoomPresenceListener, LocalUserChatRoomPresenceListener, MessageListener, org.osgi.framework.BundleActivator, org.osgi.framework.ServiceListener

public class ChatAlerterActivator
extends Object
implements org.osgi.framework.BundleActivator, org.osgi.framework.ServiceListener, MessageListener, ChatRoomMessageListener, AdHocChatRoomMessageListener, LocalUserChatRoomPresenceListener, LocalUserAdHocChatRoomPresenceListener

Chat Alerter plugin. Sends alerts to the user when new message arrives and the application is not in the foreground. On Mac OS X this will bounce the dock icon until the user selects the chat windows. On Windows, Gnome and KDE this will flash the taskbar button/icon until the user selects the chat window.

Author:
Damian Minkov

Constructor Summary
ChatAlerterActivator()
           
 
Method Summary
 void localUserAdHocPresenceChanged(LocalUserAdHocChatRoomPresenceChangeEvent evt)
          Called to notify interested parties that a change in our presence in an ad-hoc chat room has occurred.
 void localUserPresenceChanged(LocalUserChatRoomPresenceChangeEvent evt)
          Called to notify interested parties that a change in our presence in a chat room has occurred.
 void messageDelivered(AdHocChatRoomMessageDeliveredEvent evt)
          Called when the underlying implementation has received an indication that a message, sent earlier has been successfully received by the destination.
 void messageDelivered(ChatRoomMessageDeliveredEvent evt)
          Called when the underlying implementation has received an indication that a message, sent earlier has been successfully received by the destination.
 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(AdHocChatRoomMessageDeliveryFailedEvent evt)
          Called to indicate that delivery of a message sent earlier to the chat room has failed.
 void messageDeliveryFailed(ChatRoomMessageDeliveryFailedEvent evt)
          Called to indicate that delivery of a message sent earlier to the chat room has failed.
 void messageDeliveryFailed(MessageDeliveryFailedEvent evt)
          Called to indicated that delivery of a message sent earlier has failed.
 void messageReceived(AdHocChatRoomMessageReceivedEvent evt)
          Called when a new incoming Message has been received.
 void messageReceived(ChatRoomMessageReceivedEvent evt)
          Called when a new incoming Message has been received.
 void messageReceived(MessageReceivedEvent evt)
          Called when a new incoming Message has been received.
 void serviceChanged(org.osgi.framework.ServiceEvent serviceEvent)
          When new protocol provider is registered we check does it supports needed Op.
 void start(org.osgi.framework.BundleContext bc)
          Starts this bundle.
 void stop(org.osgi.framework.BundleContext bc)
          Stops bundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChatAlerterActivator

public ChatAlerterActivator()
Method Detail

start

public void start(org.osgi.framework.BundleContext bc)
           throws Exception
Starts this bundle.

Specified by:
start in interface org.osgi.framework.BundleActivator
Parameters:
bc - bundle context.
Throws:
Exception

stop

public void stop(org.osgi.framework.BundleContext bc)
          throws Exception
Stops bundle.

Specified by:
stop in interface org.osgi.framework.BundleActivator
Parameters:
bc - context.
Throws:
Exception

localUserPresenceChanged

public void localUserPresenceChanged(LocalUserChatRoomPresenceChangeEvent evt)
Called to notify interested parties that a change in our presence in a chat room has occurred. Changes may include us being kicked, join, left.

Specified by:
localUserPresenceChanged in interface LocalUserChatRoomPresenceListener
Parameters:
evt - the LocalUserChatRoomPresenceChangeEvent instance containing the chat room and the type, and reason of the change

messageReceived

public void messageReceived(MessageReceivedEvent evt)
Description copied from interface: MessageListener
Called when a new incoming Message has been received.

Specified by:
messageReceived in interface MessageListener
Parameters:
evt - the MessageReceivedEvent containing the newly received message, its sender and other details.

messageDelivered

public void messageDelivered(MessageDeliveredEvent evt)
Description copied from interface: MessageListener
Called when the underlying implementation has received an indication that a message, sent earlier has been successfully received by the destination.

Specified by:
messageDelivered in interface MessageListener
Parameters:
evt - the MessageDeliveredEvent containing the id of the message that has caused the event.

messageDeliveryFailed

public void messageDeliveryFailed(MessageDeliveryFailedEvent evt)
Description copied from interface: MessageListener
Called to indicated that delivery of a message sent earlier has failed. Reason code and phrase are contained by the MessageFailedEvent

Specified by:
messageDeliveryFailed in interface MessageListener
Parameters:
evt - the MessageFailedEvent containing the ID of the message whose delivery has failed.

messageReceived

public void messageReceived(ChatRoomMessageReceivedEvent evt)
Description copied from interface: ChatRoomMessageListener
Called when a new incoming Message has been received.

Specified by:
messageReceived in interface ChatRoomMessageListener
Parameters:
evt - the ChatRoomMessageReceivedEvent containing the newly received message, its sender and other details.

messageDelivered

public void messageDelivered(ChatRoomMessageDeliveredEvent evt)
Description copied from interface: ChatRoomMessageListener
Called when the underlying implementation has received an indication that a message, sent earlier has been successfully received by the destination.

Specified by:
messageDelivered in interface ChatRoomMessageListener
Parameters:
evt - the ChatRoomMessageDeliveredEvent containing the id of the message that has caused the event.

messageDeliveryFailed

public void messageDeliveryFailed(ChatRoomMessageDeliveryFailedEvent evt)
Description copied from interface: ChatRoomMessageListener
Called to indicate that delivery of a message sent earlier to the chat room has failed. Reason code and phrase are contained by the MessageFailedEvent

Specified by:
messageDeliveryFailed in interface ChatRoomMessageListener
Parameters:
evt - the ChatroomMessageDeliveryFailedEvent containing the ID of the message whose delivery has failed.

serviceChanged

public void serviceChanged(org.osgi.framework.ServiceEvent serviceEvent)
When new protocol provider is registered we check does it supports needed Op. Sets and if so add a listener to it

Specified by:
serviceChanged in interface org.osgi.framework.ServiceListener
Parameters:
serviceEvent - ServiceEvent

messageDelivered

public void messageDelivered(AdHocChatRoomMessageDeliveredEvent evt)
Description copied from interface: AdHocChatRoomMessageListener
Called when the underlying implementation has received an indication that a message, sent earlier has been successfully received by the destination.

Specified by:
messageDelivered in interface AdHocChatRoomMessageListener
Parameters:
evt - the AdHocChatRoomMessageDeliveredEvent containing the id of the message that has caused the event.

messageDeliveryFailed

public void messageDeliveryFailed(AdHocChatRoomMessageDeliveryFailedEvent evt)
Description copied from interface: AdHocChatRoomMessageListener
Called to indicate that delivery of a message sent earlier to the chat room has failed. Reason code and phrase are contained by the MessageFailedEvent

Specified by:
messageDeliveryFailed in interface AdHocChatRoomMessageListener
Parameters:
evt - the AdHocChatroomMessageDeliveryFailedEvent containing the ID of the message whose delivery has failed.

messageReceived

public void messageReceived(AdHocChatRoomMessageReceivedEvent evt)
Description copied from interface: AdHocChatRoomMessageListener
Called when a new incoming Message has been received.

Specified by:
messageReceived in interface AdHocChatRoomMessageListener
Parameters:
evt - the AdHocChatRoomMessageReceivedEvent containing the newly received message, its sender and other details.

localUserAdHocPresenceChanged

public void localUserAdHocPresenceChanged(LocalUserAdHocChatRoomPresenceChangeEvent evt)
Called to notify interested parties that a change in our presence in an ad-hoc chat room has occurred. Changes may include us being join, left.

Specified by:
localUserAdHocPresenceChanged in interface LocalUserAdHocChatRoomPresenceListener
Parameters:
evt - the LocalUserAdHocChatRoomPresenceChangeEvent instance containing the ad-hoc chat room and the type, and reason of the change

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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