|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.plugin.notificationwiring.NotificationManager
public class NotificationManager
Listens for all kinds of events and triggers when needed a notification, a popup or sound one or other.
| Field Summary | |
|---|---|
static String |
BUSY_CALL
Default event type for a busy call. |
static String |
CALL_SAVED
Default event type for call been saved using a recorder. |
static String |
CALL_SECURITY_ERROR
Default event type for security error on a call. |
static String |
CALL_SECURITY_ON
Default event type for activated security on a call. |
static ImageID |
DEFAULT_USER_PHOTO
The image used, when a contact has no photo specified. |
static String |
DIALING
Default event type for dialing. |
static String |
HANG_UP
Default event type for hanging up calls. |
static String |
INCOMING_CALL
Default event type for receiving calls (incoming calls). |
static String |
INCOMING_FILE
Default event type for incoming file transfers. |
static String |
INCOMING_MESSAGE
Default event type for receiving messages. |
static String |
OUTGOING_CALL
Default event type for outgoing calls. |
static String |
PROACTIVE_NOTIFICATION
Default event type for proactive notifications (typing notifications when chatting). |
static String |
SECURITY_MESSAGE
Default event type when a secure message received. |
| Constructor Summary | |
|---|---|
NotificationManager()
|
|
| Method Summary | |
|---|---|
void |
callEnded(CallEvent event)
Implements CallListener.callEnded. |
void |
callPeerAdded(CallPeerEvent evt)
Implements the CallChangeListener.callPeerAdded method. |
void |
callPeerRemoved(CallPeerEvent evt)
Implements the CallChangeListener.callPeerRemoved method. |
void |
callStateChanged(CallChangeEvent evt)
Call state changed. |
void |
conferenceFocusChanged(CallPeerConferenceEvent conferenceEvent)
Call peer has changed. |
void |
conferenceMemberAdded(CallPeerConferenceEvent conferenceEvent)
Indicates that the given conference member has been added to the given peer. |
void |
conferenceMemberRemoved(CallPeerConferenceEvent conferenceEvent)
Indicates that the given conference member has been removed from the given peer. |
void |
fileTransferCreated(FileTransferCreatedEvent event)
Nothing to do here, because we already know when a file transfer is created. |
void |
fileTransferRequestCanceled(FileTransferRequestEvent event)
Called when an IncomingFileTransferRequest has been canceled from the contact who sent it. |
void |
fileTransferRequestReceived(FileTransferRequestEvent event)
When a request has been received we show a notification. |
void |
fileTransferRequestRejected(FileTransferRequestEvent event)
Called when a new IncomingFileTransferRequest has been rejected. |
static void |
fireChatNotification(Object chatContact,
String eventType,
String messageTitle,
String message)
Fires a chat message notification for the given event type through the NotificationService. |
static NotificationData |
fireNotification(String eventType)
Fires a notification for the given event type through the NotificationService. |
static NotificationData |
fireNotification(String eventType,
String messageTitle,
String message)
Fires a message notification for the given event type through the NotificationService. |
static NotificationData |
fireNotification(String eventType,
String messageTitle,
String message,
Map<String,String> extra)
Fires a message notification for the given event type through the NotificationService. |
static BufferedImage |
getImage(ImageID imageID)
Loads an image from a given image identifier. |
static Map<Object,ProtocolProviderFactory> |
getProtocolProviderFactories()
Returns all ProtocolProviderFactorys obtained from the bundle context. |
static List<ProtocolProviderService> |
getProtocolProviders()
Returns all protocol providers currently registered. |
void |
incomingCallReceived(CallEvent event)
Implements CallListener.incomingCallReceived. |
(package private) void |
init()
Initialize, register default notifications and start listening for new protocols or removed one and find any that are already registered. |
boolean |
isConference(Call call)
Checks if the contained call is a conference call. |
void |
localUserAdHocPresenceChanged(LocalUserAdHocChatRoomPresenceChangeEvent evt)
Implements the LocalUserAdHocChatRoomPresenceListener.localUserPresenceChanged method |
void |
localUserPresenceChanged(LocalUserChatRoomPresenceChangeEvent evt)
Implements the LocalUserChatRoomPresenceListener.localUserPresenceChanged method. |
void |
messageDelivered(AdHocChatRoomMessageDeliveredEvent evt)
Implements the ChatRoomMessageListener.messageDelivered method. |
void |
messageDelivered(ChatRoomMessageDeliveredEvent evt)
Implements the ChatRoomMessageListener.messageDelivered method. |
void |
messageDelivered(MessageDeliveredEvent evt)
Fired when message is delivered. |
void |
messageDeliveryFailed(AdHocChatRoomMessageDeliveryFailedEvent evt)
Implements AdHocChatRoomMessageListener.messageDeliveryFailed method. |
void |
messageDeliveryFailed(ChatRoomMessageDeliveryFailedEvent evt)
Implements the ChatRoomMessageListener.messageDeliveryFailed method. |
void |
messageDeliveryFailed(MessageDeliveryFailedEvent evt)
Fired when message deliver fail. |
void |
messageReceived(AdHocChatRoomMessageReceivedEvent evt)
Implements the AdHocChatRoomMessageListener.messageReceived method. |
void |
messageReceived(ChatRoomMessageReceivedEvent evt)
Implements the ChatRoomMessageListener.messageReceived method. |
void |
messageReceived(MessageReceivedEvent evt)
Fired on new messages. |
void |
outgoingCallCreated(CallEvent event)
Do nothing. |
void |
peerAddressChanged(CallPeerChangeEvent evt)
Fired when peer's address is changed |
void |
peerDisplayNameChanged(CallPeerChangeEvent evt)
Fired when peer's display name is changed |
void |
peerImageChanged(CallPeerChangeEvent evt)
Fired when peer's image is changed |
void |
peerStateChanged(CallPeerChangeEvent evt)
Fired when peer's state is changed |
void |
peerTransportAddressChanged(CallPeerChangeEvent evt)
Fired when peer's transport is changed |
void |
recorderStopped(Recorder recorder)
Notifies that a specific Recorder has stopped recording the media associated with it. |
void |
securityMessageRecieved(CallPeerSecurityMessageEvent event)
Processes the received security message. |
void |
securityNegotiationStarted(CallPeerSecurityNegotiationStartedEvent securityNegotiationStartedEvent)
The handler for the security event received. |
void |
securityOff(CallPeerSecurityOffEvent securityOffEvent)
Indicates the new state through the security indicator components. |
void |
securityOn(CallPeerSecurityOnEvent evt)
When a securityOnEvent is received. |
void |
securityTimeout(CallPeerSecurityTimeoutEvent securityTimeoutEvent)
The handler for the security event received. |
void |
serviceChanged(org.osgi.framework.ServiceEvent event)
Implements the ServiceListener method. |
static void |
stopSound(NotificationData data)
Stops all sounds for the given event type. |
void |
typingNotificationReceived(TypingNotificationEvent event)
Informs the user what is the typing state of his chat contacts. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ImageID DEFAULT_USER_PHOTO
public static final String CALL_SAVED
public static final String INCOMING_FILE
public static final String CALL_SECURITY_ERROR
public static final String CALL_SECURITY_ON
public static final String SECURITY_MESSAGE
public static final String PROACTIVE_NOTIFICATION
public static final String HANG_UP
public static final String DIALING
public static final String BUSY_CALL
public static final String OUTGOING_CALL
public static final String INCOMING_CALL
public static final String INCOMING_MESSAGE
| Constructor Detail |
|---|
public NotificationManager()
| Method Detail |
|---|
void init()
public static Map<Object,ProtocolProviderFactory> getProtocolProviderFactories()
public static List<ProtocolProviderService> getProtocolProviders()
public void serviceChanged(org.osgi.framework.ServiceEvent event)
serviceChanged in interface org.osgi.framework.ServiceListenerevent - The ServiceEvent object.
public static NotificationData fireNotification(String eventType,
String messageTitle,
String message)
eventType - the event type for which we fire a notificationmessageTitle - the title of the messagemessage - the content of the message
public static NotificationData fireNotification(String eventType,
String messageTitle,
String message,
Map<String,String> extra)
eventType - the event type for which we fire a notificationmessageTitle - the title of the messagemessage - the content of the messageextra - additional event data for external processing
public static void fireChatNotification(Object chatContact,
String eventType,
String messageTitle,
String message)
chatContact - the chat contact to which the chat message corresponds;
the chat contact could be a Contact or a ChatRoom.eventType - the event type for which we fire a notificationmessageTitle - the title of the messagemessage - the content of the messagepublic static NotificationData fireNotification(String eventType)
eventType - the event type for which we want to fire a notification
public static void stopSound(NotificationData data)
data - the event type for which we should stop sounds. One of
the static event types defined in this class.public static BufferedImage getImage(ImageID imageID)
imageID - The identifier of the image.
public boolean isConference(Call call)
call - the call to check
true if the contained Call is a conference
call, otherwise - returns false.public void messageReceived(MessageReceivedEvent evt)
messageReceived in interface MessageListenerevt - the MessageReceivedEvent containing
details on the received messagepublic void messageDelivered(MessageDeliveredEvent evt)
messageDelivered in interface MessageListenerevt - the MessageDeliveredEvent containing
details on the delivered messagepublic void messageDeliveryFailed(MessageDeliveryFailedEvent evt)
messageDeliveryFailed in interface MessageListenerevt - the MessageDeliveryFailedEvent containing
details on the failed messagepublic void fileTransferRequestReceived(FileTransferRequestEvent event)
fileTransferRequestReceived in interface FileTransferListenerevent - FileTransferRequestEventFileTransferListener.fileTransferRequestReceived(FileTransferRequestEvent)public void fileTransferCreated(FileTransferCreatedEvent event)
fileTransferCreated in interface FileTransferListenerevent - the FileTransferCreatedEvent that notified uspublic void fileTransferRequestRejected(FileTransferRequestEvent event)
fileTransferRequestRejected in interface FileTransferListenerevent - the FileTransferRequestEvent containing the
received request which was rejected.public void fileTransferRequestCanceled(FileTransferRequestEvent event)
fileTransferRequestCanceled in interface FileTransferListenerevent - the FileTransferRequestEvent containing the
request which was canceled.public void typingNotificationReceived(TypingNotificationEvent event)
typingNotificationReceived in interface TypingNotificationsListenerevent - the event containing details on the typing notificationpublic void incomingCallReceived(CallEvent event)
incomingCallReceived in interface CallListenerevent - the CallEventpublic void outgoingCallCreated(CallEvent event)
outgoingCallCreated in interface CallListenerevent - the CallEventpublic void callEnded(CallEvent event)
callEnded in interface CallListenerevent - the CallEventpublic void callPeerAdded(CallPeerEvent evt)
callPeerAdded in interface CallChangeListenerevt - the CallPeerEvent that notifies us for the changepublic void callPeerRemoved(CallPeerEvent evt)
callPeerRemoved in interface CallChangeListenerevt - the CallPeerEvent that has been triggeredpublic void callStateChanged(CallChangeEvent evt)
callStateChanged in interface CallChangeListenerevt - the CallChangeEvent instance containing the sourcepublic void peerStateChanged(CallPeerChangeEvent evt)
peerStateChanged in interface CallPeerListenerevt - fired CallPeerEventpublic void peerDisplayNameChanged(CallPeerChangeEvent evt)
peerDisplayNameChanged in interface CallPeerListenerevt - fired CallPeerEventpublic void peerAddressChanged(CallPeerChangeEvent evt)
peerAddressChanged in interface CallPeerListenerevt - fired CallPeerEventpublic void peerTransportAddressChanged(CallPeerChangeEvent evt)
peerTransportAddressChanged in interface CallPeerListenerevt - fired CallPeerEventpublic void peerImageChanged(CallPeerChangeEvent evt)
peerImageChanged in interface CallPeerListenerevt - fired CallPeerEventpublic void securityOn(CallPeerSecurityOnEvent evt)
securityOn in interface CallPeerSecurityListenerevt - the event we receivedpublic void securityOff(CallPeerSecurityOffEvent securityOffEvent)
securityOff in interface CallPeerSecurityListenersecurityOffEvent - the event we receivedpublic void securityTimeout(CallPeerSecurityTimeoutEvent securityTimeoutEvent)
securityTimeout in interface CallPeerSecurityListenersecurityTimeoutEvent - the security timeout event receivedpublic void securityNegotiationStarted(CallPeerSecurityNegotiationStartedEvent securityNegotiationStartedEvent)
securityNegotiationStarted in interface CallPeerSecurityListenersecurityNegotiationStartedEvent - the security started event receivedpublic void securityMessageRecieved(CallPeerSecurityMessageEvent event)
securityMessageRecieved in interface CallPeerSecurityListenerevent - the event we receivedpublic void messageReceived(ChatRoomMessageReceivedEvent evt)
messageReceived in interface ChatRoomMessageListenerevt - the ChatRoomMessageReceivedEvent that notified us
that a message has been receivedpublic void messageDelivered(ChatRoomMessageDeliveredEvent evt)
messageDelivered in interface ChatRoomMessageListenerevt - the ChatRoomMessageDeliveredEvent that notified us
that the message was delivered to its destinationpublic void messageDeliveryFailed(ChatRoomMessageDeliveryFailedEvent evt)
messageDeliveryFailed in interface ChatRoomMessageListenerevt - the ChatRoomMessageDeliveryFailedEvent that notified
us of a delivery failurepublic void localUserPresenceChanged(LocalUserChatRoomPresenceChangeEvent evt)
localUserPresenceChanged in interface LocalUserChatRoomPresenceListenerevt - the LocalUserChatRoomPresenceChangeEvent that
notified uspublic void localUserAdHocPresenceChanged(LocalUserAdHocChatRoomPresenceChangeEvent evt)
localUserAdHocPresenceChanged in interface LocalUserAdHocChatRoomPresenceListenerevt - the LocalUserAdHocChatRoomPresenceChangeEvent that
notified us of a presence changepublic void messageReceived(AdHocChatRoomMessageReceivedEvent evt)
messageReceived in interface AdHocChatRoomMessageListenerevt - the AdHocChatRoomMessageReceivedEvent that notified
uspublic void messageDelivered(AdHocChatRoomMessageDeliveredEvent evt)
messageDelivered in interface AdHocChatRoomMessageListenerevt - the ChatRoomMessageDeliveredEvent that notified us
that the message was delivered to its destinationpublic void messageDeliveryFailed(AdHocChatRoomMessageDeliveryFailedEvent evt)
messageDeliveryFailed in interface AdHocChatRoomMessageListenerevt - the AdHocChatRoomMessageDeliveryFailedEvent that
notified uspublic void conferenceFocusChanged(CallPeerConferenceEvent conferenceEvent)
conferenceFocusChanged in interface CallPeerConferenceListenerconferenceEvent - a CallPeerConferenceEvent with ID
CallPeerConferenceEvent#CONFERENCE_FOCUS_CHANGEDpublic void conferenceMemberAdded(CallPeerConferenceEvent conferenceEvent)
conferenceMemberAdded in interface CallPeerConferenceListenerconferenceEvent - the eventpublic void conferenceMemberRemoved(CallPeerConferenceEvent conferenceEvent)
conferenceMemberRemoved in interface CallPeerConferenceListenerconferenceEvent - the eventpublic void recorderStopped(Recorder recorder)
recorderStopped in interface Recorder.Listenerrecorder - the Recorder which has stopped recording its
associated media
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||