Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.notification
Class Notification

java.lang.Object
  extended by net.java.sip.communicator.service.notification.Notification

public class Notification
extends Object

Represents an event notification.

Author:
Yana Stamcheva

Constructor Summary
Notification(String eventType)
          Creates an instance of EventNotification by specifying the event type as declared by the bundle registering it.
 
Method Summary
 Object addAction(NotificationAction action)
          Adds the given actionType to the list of actions for this event notifications.
 NotificationAction getAction(String actionType)
          Returns the Action corresponding to the given actionType.
 Map<String,NotificationAction> getActions()
          Returns the set of actions registered for this event notification.
 boolean isActive()
          Indicates if this event notification is currently active.
 void removeAction(String actionType)
          Removes the action corresponding to the given actionType.
 void setActive(boolean isActive)
          Activates or deactivates this event notification.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Notification

public Notification(String eventType)
Creates an instance of EventNotification by specifying the event type as declared by the bundle registering it.

Parameters:
eventType - the name of the event
Method Detail

addAction

public Object addAction(NotificationAction action)
Adds the given actionType to the list of actions for this event notifications.

Parameters:
action - the the handler that will process the given action type.
Returns:
the previous value of the actionHandler for the given actionType, if one existed, NULL if the actionType is a new one

removeAction

public void removeAction(String actionType)
Removes the action corresponding to the given actionType.

Parameters:
actionType - one of NotificationService.ACTION_XXX constants

getActions

public Map<String,NotificationAction> getActions()
Returns the set of actions registered for this event notification.

Returns:
the set of actions registered for this event notification

getAction

public NotificationAction getAction(String actionType)
Returns the Action corresponding to the given actionType.

Parameters:
actionType - one of NotificationService.ACTION_XXX constants
Returns:
the Action corresponding to the given actionType

isActive

public boolean isActive()
Indicates if this event notification is currently active.

Returns:
true if this event notification is active, false otherwise.

setActive

public void setActive(boolean isActive)
Activates or deactivates this event notification.

Parameters:
isActive - indicates if this event notification is active

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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