Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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

java.lang.Object
  extended by net.java.sip.communicator.service.notification.NotificationAction
Direct Known Subclasses:
CommandNotificationAction, LogMessageNotificationAction, PopupMessageNotificationAction, SoundNotificationAction

public abstract class NotificationAction
extends Object

Base class for actions of a notification.

Author:
Ingo Bauersachs

Field Summary
static String ACTION_COMMAND
          The command action type indicates that a command would be executed, when a notification is fired.
static String ACTION_LOG_MESSAGE
          The log message action type indicates that a message would be logged, when a notification is fired.
static String ACTION_POPUP_MESSAGE
          The popup message action type indicates that a window (or a systray popup), containing the corresponding notification message would be poped up, when a notification is fired.
static String ACTION_SOUND
          The sound action type indicates that a sound would be played, when a notification is fired.
static int NUM_ACTIONS
          Defines the number of actions.
 
Constructor Summary
protected NotificationAction(String actionType)
          Creates a new instance of this class.
 
Method Summary
 String getActionType()
          Return the action type name.
 boolean isEnabled()
          Returns TRUE if this notification action handler is enabled and FALSE otherwise.
 void setEnabled(boolean isEnabled)
          Enables or disables this notification handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_SOUND

public static final String ACTION_SOUND
The sound action type indicates that a sound would be played, when a notification is fired.

See Also:
Constant Field Values

ACTION_POPUP_MESSAGE

public static final String ACTION_POPUP_MESSAGE
The popup message action type indicates that a window (or a systray popup), containing the corresponding notification message would be poped up, when a notification is fired.

See Also:
Constant Field Values

ACTION_LOG_MESSAGE

public static final String ACTION_LOG_MESSAGE
The log message action type indicates that a message would be logged, when a notification is fired.

See Also:
Constant Field Values

ACTION_COMMAND

public static final String ACTION_COMMAND
The command action type indicates that a command would be executed, when a notification is fired.

See Also:
Constant Field Values

NUM_ACTIONS

public static final int NUM_ACTIONS
Defines the number of actions.

See Also:
Constant Field Values
Constructor Detail

NotificationAction

protected NotificationAction(String actionType)
Creates a new instance of this class.

Parameters:
actionType - The action type name.
Method Detail

getActionType

public String getActionType()
Return the action type name.

Returns:
the action type name.

isEnabled

public boolean isEnabled()
Returns TRUE if this notification action handler is enabled and FALSE otherwise. While the notification handler for the sound action type is disabled no sounds will be played when the fireNotification method is called.

Returns:
TRUE if this notification action handler is enabled and FALSE otherwise

setEnabled

public void setEnabled(boolean isEnabled)
Enables or disables this notification handler. While the notification handler for the sound action type is disabled no sounds will be played when the fireNotification method is called.

Parameters:
isEnabled - TRUE to enable this notification handler, FALSE to disable it.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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