Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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

All Superinterfaces:
OperationSet
All Known Implementing Classes:
OperationSetGenericNotificationsJabberImpl

public interface OperationSetGenericNotifications
extends OperationSet

Provides notification for custom/generic events and possibility to generate such events.

Author:
Damian Minkov

Method Summary
 void addGenericEventListener(String eventName, GenericEventListener listener)
          Registers a GenericEventListener with this operation set so that it gets notifications for new event notifications.
 void notifyForEvent(Contact contact, String eventName, String eventValue)
          Generates new generic event notification and send it to the supplied contact.
 void notifyForEvent(String jid, String eventName, String eventValue)
          Generates new generic event notification and send it to the supplied contact.
 void notifyForEvent(String jid, String eventName, String eventValue, String source)
          Generates new generic event notification and send it to the supplied contact.
 void removeGenericEventListener(String eventName, GenericEventListener listener)
          Unregisters listener so that it won't receive any further notifications upon new event notifications.
 

Method Detail

notifyForEvent

void notifyForEvent(Contact contact,
                    String eventName,
                    String eventValue)
Generates new generic event notification and send it to the supplied contact.

Parameters:
contact - the contact to receive the event notification.
eventName - the event name of the notification.
eventValue - the event value of the notification.

notifyForEvent

void notifyForEvent(String jid,
                    String eventName,
                    String eventValue)
Generates new generic event notification and send it to the supplied contact.

Parameters:
jid - the contact jid which will receive the event notification.
eventName - the event name of the notification.
eventValue - the event value of the notification.

notifyForEvent

void notifyForEvent(String jid,
                    String eventName,
                    String eventValue,
                    String source)
Generates new generic event notification and send it to the supplied contact.

Parameters:
jid - the contact jid which will receive the event notification.
eventName - the event name of the notification.
eventValue - the event value of the notification.
source - the source that will be reported in the event.

addGenericEventListener

void addGenericEventListener(String eventName,
                             GenericEventListener listener)
Registers a GenericEventListener with this operation set so that it gets notifications for new event notifications.

Parameters:
eventName - register the listener for certain event name.
listener - the GenericEventListener to register.

removeGenericEventListener

void removeGenericEventListener(String eventName,
                                GenericEventListener listener)
Unregisters listener so that it won't receive any further notifications upon new event notifications.

Parameters:
eventName - unregister the listener for certain event name.
listener - the GenericEventListener to unregister.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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